PDA

View Full Version : Help with window height?



rnzhkr
05-01-2009, 12:27 PM
I am very new to OpenGL and graphical programming altogether. I created my OpenGL window (with help from websites..) and modified it to tile the window with textures.

However, my textures always cut off screen or display with blackness around them, I don't understand why.. the width is fine when I change it, but the height is the main culprit. Whenever I modify the screens height from the code it just resizes my tile grid to meet the new height, not fixing the problem.. how can I get OpenGL to stop automatically resizing by height?

ZbuffeR
05-01-2009, 01:51 PM
You mean you get a wrong aspect ratio ?
http://stackoverflow.com/questions/648619/resizing-an-opengl-window-causes-it-to-fall-apart

Or that the vertical field of view is fixed, whereas you would prefer to pin the horizontal field of view ?

Anyway it depends on how you define your projection ...
http://www.opengl.org/sdk/docs/man/xhtml/glFrustum.xml
or
http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/glu/perspective.html