Advertisement

glViewport, glOrtho, and Resolution, oh my!

Started by August 19, 2001 11:20 AM
1 comment, last by Dave the Embalmer 23 years, 6 months ago
I''m having a bit of a problem with what was mentioned in the topic =). I want 640x480 of drawing coordinates no matter the user''s screen resolution. (i.e. glTranslatef(320,240) would go to the same spot at 640x480 than at 1024x768). I am calling glViewport (640x480) and glOrtho(0,0,640,480,-10,10) no matter the resolution, but its as if the program is ignoring them. Things draw in the wrong spot, and are smaller. At least I think they''re smaller, its a tad bit hard to tell...How can I make the coordinate grid think its 640x480 no matter what the resolution? Thanks! -Dave
the resolution doesnt effect the co-ordinate sytem! in orth graphics co-oridinates start form 0, at the botom left of ure screen

just mkae sure u adjust the viewport to the res of the screen


Edited by - zerosignull on August 19, 2001 1:34:06 PM
Advertisement
Thanks, that did the trick!

This topic is closed to new replies.

Advertisement