Sign in to follow this  

Resolution independent GUI

This topic is 3732 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

First of all, I'm using opengl. How do I create a GUI system that will be resolution independent, that is by scaling, display the same on any resolution. I tried to solve the problem in the following mode: draw the GUI in world space(this definitely works but because of the texture filtering the quality of the output is not that high), and the second method draw the guy in screen space using glDrawPixels. The quality this time is way bigger than the quality obtained from the first method. But now, there is no stretching and scaling of the pixels and thus they don't align with the background. What should I do?

Share this post


Link to post
Share on other sites
This is how I approached it:

Draw your game.
Switch to Ortho and draw your 2d GUI.
Use a height based metric to properly size your controls and such.

Now, for images and that I made sure everything was oversized. Downscaling with LINEAR looks ok and you can use mipmaps to make it even cleaner. Fonts I just built at the proper size for the specific metric. This seems a clean and effective way to make the GUI resolution independent.

Share this post


Link to post
Share on other sites

This topic is 3732 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this