Jump to content
  • Advertisement
Sign in to follow this  

OpenGL OpenGL/SDL user interface creation

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

I am in the process of writing a small OpenGL/SDL application which for the moment can only be controlled using the keyboard. I would like to add some graphical user interface options in the form of buttons, textboxes and similar. One solution would be to use GTK or similar, or even an existing openGL UI toolkit. However, since I am curious and want to learn, I would rather learn how to implement something like this by myself. I have searched on google, but found nothing that could help me with my problem. I would appreciate a simple tutorial on e.g. creating a clickable button. If my button is implemented using a simple textured QUAD, how do I know when the user clicked it or hovers above it? Are there better ways to do it, e.g.: 1) should the UI be done using 2D or 3D API? 2) should I create seperate windows/viewports to contain the controls, or should I just add everything inside the main window? What is the best and/or simplest way to render text, e.g. on a button? I'd appreciate any help I can get on this, thanks in advance Edit: after browsing around some more I found this: http://openglgui.sourceforge.net/gui_tut1.html I suppose that answers most of my questions. [Edited by - cornergraf on July 14, 2007 2:42:05 AM]

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!