zoom by rubberband box
I've got a scene rendered and using gluPerspective and gluLookAt for projection and navigation. I am using a "rubberband box" to isolate a square portion of the screen and would like to zoom in on the boxed area. The box returns it's position and size in pixels.
Is there a way to convert pixel coordinates to eye and point coordinates?
Thanks for any help!
Re: zoom by rubberband box
I'm using an orthographic view and doing the same thing, dunno if this will help or not...
I don't do any conversions into coordinates as such. I get the size of the box as a percentage of the toatl screen, calculate the center of the box as a percentage of the total screen, then use glScale and glTranslate to get that position zoomed into the window.