There is some GL stuff here to get you started ..
Rem
bbdoc: Set the rotation of the viewport
about: SetViewRotation allows you to rotate the entire viewport, so that all
drawing is rotated according to the @angle parameter.
EndRem
Function SetViewRotation(angle:Float)
Global o_angle:Float
glMatrixMode GL_PROJECTION
glRotatef angle-o_angle,0,0,1
o_angle=angle
glMatrixMode GL_MODELVIEW
glLoadIdentity
End Function
Rem
bbdoc: Set the offset of the viewport
about: SetViewOffset allows you to offset the entire viewport, so that all
drawing is offset according to the @offsetx and @offsety parameters.
EndRem
Function SetViewOffset(offsetx:Float,offsety:Float)
Global o_offsetx:Float
Global o_offsety:Float
glMatrixMode GL_PROJECTION
glTranslatef offsetx-o_offsetx,offsety-o_offsety,0
o_offsetx = offsetx
o_offsety = offsety
glMatrixMode GL_MODELVIEW
glLoadIdentity
End Function
Rem
bbdoc: Set the zoom factor of the viewport
about: SetViewZoom allows you to zoom all drawn elements at once, instead
of scaling each individual element. Use the @zoom parameter to define the
level of zoom, a value of 0 is the default zoom, >0 zooms in, <0 zooms out.
EndRem
Function SetViewZoom(zoom:Float)
Global o_zoom:Float
glMatrixMode GL_PROJECTION
glScalef 1.0+(zoom-o_zoom),1.0+(zoom-o_zoom),1.0+(zoom-o_zoom)
o_zoom = zoom
glMatrixMode GL_MODELVIEW
glLoadIdentity
End Function
Rem
bbdoc: Flip the screen horizontally
EndRem
Function FlipScreenX()
glMatrixMode GL_PROJECTION
glScalef -1.0 , 1.0 , 1.0
glTranslatef -GraphicsWidth(),0,0
glMatrixMode GL_MODELVIEW
glLoadIdentity
End Function
Rem
bbdoc: Flip the screen vertically
EndRem
Function FlipScreenY()
glMatrixMode GL_PROJECTION
glScalef 1.0 , -1.0 , 1.0
glTranslatef 0,-GraphicsHeight(),0
glMatrixMode GL_MODELVIEW
glLoadIdentity
End Function