Jump to content
  • Advertisement
Sign in to follow this  
ManaStone

OpenGL Orthogonal Mode and performance.

This topic is 4706 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’m currently in the process of making an OpenGL GUI library and I am using a virtual coordinate system to make sure all of the windows are the same size regardless of the resolution. When I render a component, it takes the position and dimensions and scales it before it renders, but I’ve been thinking that maybe instead of doing that I can just put everything in orthogonal mode with my virtual screen size as the dimensions and then I wouldn’t have to do any scaling. If I do this though, will there be a significant performance hit?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by ManaStone
If I do this though, will there be a significant performance hit?


Compared to what? Manually doing calculations that aren't really necessary? The only thing I would keep in mind is that some positions will be "between" pixels. So if you already do the extra math you could try to do it once at start up but slightly adjust the positions to directly map onto single pixels for the current resolution. Not sure if AA would compensate for that enough, as I never turn it on.

Share this post


Link to post
Share on other sites
Orthogonal mode is just as fast as normal 3d rendering. The only difference is in projection matrix. For any reasonable GUI you should be able to get very high performance.

Share this post


Link to post
Share on other sites
Thx for the input. I’ve been doing a little experimenting with orthogonal mode and it becomes a lot more blurry when using it. I also begin so see “cracks” in where the textures are placed. I think I’m just going to stick with scaling for now.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!