Jump to content
  • Advertisement
Sign in to follow this  
Mathy

How do you render your menus?

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

As a Direct3D user, I find it hard generating graphical menus. How do you do it? Through textured quads? Flat boxes? Any advice for me, if I want to make a basic menu?

Share this post


Link to post
Share on other sites
Advertisement
Depends on what I need. In general the abstraction is already made. You have a table/layout construct and text/image constructs and OnClick events. Or you have a UI framework to handle all the gory details for you.

Share this post


Link to post
Share on other sites
It's up to you.
For buttons, probably a textured quad, with a text rendered on top of it.
The texture can depend on the widget state: normal/pushed/highlighted/disabled/whatever.
I use atlas texture for the GUI, with all the necessary images inside it.
Because of the slow font rendering, it may be a good idea to render the GUI to a texture, and display that, and only change this texture, if something changes in the appearance of the GUI.

Note: rendering a button probably uses more quads, depending on the texture.
One quad in case of a circle shaped GUI is enough.
If you want a rounded rectangle shape, with any width and height, that requires 9 quads.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!