Advertisement

glOrtho and Translatef

Started by April 16, 2001 05:44 PM
1 comment, last by PCI 23 years, 7 months ago
I have my screen in Ortho mode but was curious of a few things . -Can I turn glOrtho off and put it back into ''3D'' mode and vice versa mid program? . -When I translate normally we translate in standard gl units, but if I set Ortho mode to glOrtho(0,width,height,0) and then translate glTranslatef(0.0f,1.0f,0.0f); does it translate in the normal units or in the pixel type untis I specified in glOrtho. Hope I make sense Any replies appreciated
When you call glOrtho you are setting the clipping volume. The coordinates you supply to it are the max x,y,z cartseian coordinate values. GlOrtho maps the amount of pixels to the coordinates ie 1 unit in the x axis could represent 2 pixels in the window it depends on the size of the window. I''m not sure if you could change the type of mode used during runtime as it''s crucial to the rendering. I may be wrong though I''m still a beginner my self.

Steve
Advertisement
Sure, you can change the different matrices as many times as you want. I suggest you look into glPushMatrix and glPopMatrix, they speed it up a little .

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://druidgames.cjb.net/

This topic is closed to new replies.

Advertisement