PDA

View Full Version : Aspect Ratio



Crilston
06-25-2005, 05:48 AM
Can I set my coordinates according to my window's aspect ratio (the way that the right bottom corner will be 3, 4)?

Azdo
06-26-2005, 05:21 AM
Originally posted by Crilston:
Can I set my coordinates according to my window's aspect ratio (the way that the right bottom corner will be 3, 4)?For setting the coordinates scale, is usually useful glScalef. In your case,
glScalef(3,4,1);

Relic
06-27-2005, 06:32 AM
glScale has not much to do with pixel locations of your viewport.
Check glViewport and the glOrtho or gluOrtho2D or gluPerspective parameters to specify viewport and aspect ratio so that it matches your desired layout.