Jump to content
  • Advertisement
Sign in to follow this  

Best way to create a render friendly GUI system.

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

So, I've got some downtime right now and I decided to go about doing a GUI system, something I have yet to do in my years doing game programming. The OO structure is nothing new to me, but I can't seem to think of the best way to actually render a GUI system using DirectX. Here are some of the approaches I've heard of: 1. Using a series of sprites to denote a window. I.e. a Sprite for each corner, each window bar, and the background. 2. Using a single sprite as a sort of PEN object that just changes texture, size, and scale to draw each object on the window. and one I thought of doing: 3. Using a series of Quads, with a Window manager that can get all of the visible window geometry to throw in a single vertex buffer, and then use a rendering queue to set textures and draw the appropriate parts of the window in the correct order. Obviously I'm trying to minimize BeginScene/EndScene calls and Lock/UnLock calls. Is there any recommended way to do a speedy GUI? Is going with Sprites really better than doing a Quad class?

Share this post


Link to post
Share on other sites
Advertisement
It really depends on how your renderer is set up. Are you using this GUI for a HUD or some other form of in-game system? Or is it for menus only. If it's only going to be used for menus then I wouldn't even worry about the performance.

I'm sure if you google GUI you'll find some interesting stuff on how to set one up in an efficient and logical manner.

Personally I would do the 3rd option as it allows for more robust menus, etc. 3D is fun!

Share this post


Link to post
Share on other sites
Quote:
Original post by Morpheus011
It really depends on how your renderer is set up. Are you using this GUI for a HUD or some other form of in-game system? Or is it for menus only. If it's only going to be used for menus then I wouldn't even worry about the performance.

I'm sure if you google GUI you'll find some interesting stuff on how to set one up in an efficient and logical manner.

Personally I would do the 3rd option as it allows for more robust menus, etc. 3D is fun!


I'd really like a system that is flexible to be used as a Menu system and as a HUD system.

I've been leaning towards the third option as well, but just wanted to check what others have done and learned before I started on it.

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!