2D without stretching

May 3, 2013 at 1:37 PM
How can I have a 2D setup without stretching.
I have an image texturing a quad but when I resize the window it stretches. I don't want stretching I want the viewport to get bigger. I want to maintain the aspect as well as being able to zoom and pan?

Any code snippets that does this?
Coordinator
May 5, 2013 at 3:42 PM
I'd search for standard OpenGL samples for this and then port them, but the short answer is that you'll have to scale the projection matrix to keep things at a constant size from the viewer's point of view. Also, you can try this:

http://thisoldhack.blogspot.be/2011/11/maintaining-aspect-ratio-in-opengl-with.html