No docs but here is some code :
Strict Rem bbdoc: Projection Matrix - How To Set Matrix For scales End Rem Module Indiepath.projmatrix ModuleInfo "Version: 1.0" ModuleInfo "Author: Tim Fisher" ModuleInfo "License: Indiepath License for non warranted software" ModuleInfo "Modserver:Indiepath" 'End Rem ?Win32 Import BRL.D3D7Max2D ? Import BRL.GLMax2D Type ProjectionMatrix Field Scale:Float Field width:Float Field height:Float Field depth:Float Field angle:Float Rem bbdoc:Initialise and create a new Projection Matrix Object returns: Returns handle to object about: Pass base resolution width, height and depth. Angle and scale are not currently implemented End Rem Function Initialise:ProjectionMatrix(width:Float=800,height:Float=600,depth:Float=2,angle:Float=0,scale:Float=1) Local p:ProjectionMatrix = New ProjectionMatrix p.width = width p.height = height p.scale = scale p.depth = depth p.angle = angle p.Set() Return p End Function Rem bbdoc: Free the matrix object End Rem Function Free(p:ProjectionMatrix) p = Null End Function Method Set() ?Win32 If primarydevice.device = Null Then glMatrixMode GL_PROJECTION glLoadIdentity glOrtho 0,Self.width,Self.height,0,-1,1 glMatrixMode GL_MODELVIEW Else Local matrix#[] Local sx:Float = (2.0/Self.Width) '* Cos(Self.Angle) Local sy:Float = (2.0/Self.Height) * Cos(Self.Angle) Local sx1:Float = -Sin(Self.Angle) Local sy1:Float = Sin(Self.Angle) matrix=[.. sx ,0.0 ,0.0 ,0.0,.. 0.0 ,-sy ,0.0 ,0.0,.. 0.0 ,0.0 ,2.0/Self.depth ,0.0,.. -1-(1.0/Self.width),1+(1.0/Self.height),1.0,1.0] primarydevice.Device.SetTransform(D3DTS_PROJECTION,matrix) EndIf ?MacOS glMatrixMode GL_PROJECTION glLoadIdentity glOrtho 0,Self.width,Self.height,0,-1,1 glMatrixMode GL_MODELVIEW ? End Method Method Rotate(angle:Float) Self.Angle = angle Self.Set() End Method Rem bbdoc: Translate Mouse returns: Translated x & y about: Translates the mouse position depending on matrix settings. End Rem Method TranslateMouse(x# Var, y# Var) x# = (MouseX()/Float(GraphicsWidth()))*Self.Width y# = (MouseY()/Float(GraphicsHeight()))*Self.Height End Method