Jump to content
  • Advertisement

Archived

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

onebeer

Clipping in ortho mode

This topic is 5373 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have an OpenGL app that changes to Ortho mode to put text and buttons over the rendered scene. I would like to write a common class that lets me specify the top,left,bottom,right rectangle to do my drawing, whether that is a button, bitmap, text, etc. When writing an Win32 app, the window is automatically clipped. I would like to have OpenGL do the same thing. Any ideas? Or should I just make sure I don''t write outside the box? Keith

Share this post


Link to post
Share on other sites
Advertisement
No, but the frustrum does, so as long as you constrain yourself to a subset of operations (i.e. no changes in line width, no raster pos commands and a few others) glViewport will work. It becomes useful if you wish to specify a new coordinate system for the component.

Enigma

Share this post


Link to post
Share on other sites
quote:
Original post by Enigma
No, but the frustrum does, so as long as you constrain yourself to a subset of operations (i.e. no changes in line width, no raster pos commands and a few others) glViewport will work.


*confused* when did glViewport start to touch the frustum?

Share this post


Link to post
Share on other sites
quote:
Original post by Trienco
*confused* when did glViewport start to touch the frustum?

It don''t touch the frustum. It defines the transformation from normalized device coordinates to window coordinates. So if you make the viewport smaller, you will only squeez the frustum into a smaller part of the window, but the frustum itself is not affected.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!