Sign in to follow this  
Mathy

How do you render your menus?

Recommended Posts

Mathy    104
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
Telastyn    3777
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
szecs    2990
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

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