Orthogonal Mode and performance.
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?
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement