in reply to Re: POGL Zooming to a certain point
in thread POGL Zooming to a certain point

i dont want to move the camera, i want to move the background and only draw what would be visible by the camera.

what i was thinking is...

add feature for cropping left and top (to stop drawing of any excess OGL code) - right and bottom cropping already present
find an equation to figure out each blocks x,y boundaries
take mouses x,y and center using $Width

Replies are listed 'Best First'.
Re^3: POGL Zooming to a certain point
by chromatic (Archbishop) on Apr 18, 2008 at 22:04 UTC

    Your other option then is to use glViewport() to change the viewport. This may be easier than changing the camera position. You should be able to rely on OpenGL doing any culling for you, so you don't have to do the math to figure out which blocks to display.