Archived

This topic is now archived and is closed to further replies.

TheBlackJester

Orthographic Rendering

Recommended Posts

Ok, The most common question about orthographic rendering in OpenGL is, "How can I render in 2D in OpenGL". Well, thats not my question. I need to know how you use glOrhto() in order to render in 3D, but to not have the objects affected by perspective. I''m trying to place 2D Sprites on a 3D terrain, but when I move, I don''t want the sprites to be affected by the the perspective. I''ve tried simply changing to glOrtho() when I render the sprites, but it insists on rendering them in screen coords as if it were gluOrtho2d() Any help would be great. Thank you


"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I''m reaching up and reaching out. I''m reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one''s been. We''ll ride the spiral to the end and may just go where no one''s been." - Maynard James Keenan
[TheBlackJester ]
[Wildfire Studios ]

Share this post


Link to post
Share on other sites
Are you just trying to billboard the sprites? If so, you can keep the perspective mode, and just make the sprites textured quads that are perpendicular to the view. This way, there won''t be any perspective changes, except for total size.

Share this post


Link to post
Share on other sites
I am doing sprites, but I''m not trying to billboard them. The billboarding would be very obviouls as the camera angle does not change, it just moves around. The perspective is like ortho, and the buildings are rendered on a quad at the samee angle as the cam is facing downward. I just need the actual quads to not change size with depth or left to right as they would with a normal perspective view.



"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I''m reaching up and reaching out. I''m reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one''s been. We''ll ride the spiral to the end and may just go where no one''s been." - Maynard James Keenan
[TheBlackJester ]
[Wildfire Studios ]

Share this post


Link to post
Share on other sites