Zoom View

BlitzMax Forums/BlitzMax Programming/Zoom View

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Is it possible?
I found this from here : http://www.blitzmax.com/Community/posts.php?topic=42799&hl=zoom
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

It's good use of OpenGL.
But when I zoom in and out the origin changes...
Also I cannot find a proper way to get coordinates using the MouseX() and MouseY().

Is there another way to do this?
Or I am just loosing my time?
Is there a probability to be impemented in Max2D?