Sign in to follow this  
mvNoise

Where to begin with GUI?

Recommended Posts

How does one create a GUI with C++? I don't want to use the default Windows UI components. Do I have to create my own using OpenGL? I'm just not too clear on this whole subject. I've been googling for hours now. My goal is to create a 3D pong clone in OpenGL/C++ -I would rather not use someone elses cryptic external library. -I'm also trying to avoid DirectX at all costs. My knowledge: I understand the fundamentals of computer science and C++ I've worked with OpenGL, C++, Win32 API. (made a tile-based map editor with no GUI)

Share this post


Link to post
Share on other sites
OpenGL doesn't provide a GUI system, heck it doesn't even provide a way of drawing text. So, you will have to create your own GUI. If you are looking for a simple menu system to be used in game it's not that hard.

- Implement a font manager so that you can draw arbitrary text anywhere on the screen. Look into font texture generators like Fluid Studios FontGen.

- Implement a keyboard/mouse selection system. For keyboard, you can just highlight the current menu selection, for mouse you will have to figure out the ranges of the xy coordinates and map them to menu entries.

- Finally, implement a menu state system so that you can enter submenus, exit them and bind scripts (or function callbacks) to each menu entry.

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