Making a GUI for OpenGL Games?
stuck in a bind asks: "I am currently coding a civilization-type game (in C) but on a galactic scale. OpenGL is used to draw everything so far. However I have been unable to find a decent, nice GUI, practically all of them are coded in C++.
The only other options I can think of is coding my own toolkit (too much work, and I would hate to reinvent the wheel here), using SDL to draw 2D bitmaps on top of my OpenGL window. The last option would be to switch to GTK and use the GTK GL widget. What would the educated gamer/programmers of Slashdot recommend?"
OO is pretty much ideal for GUI programming. So why not code up your GUI in C++ and leave the rest of your game in C?
Is there some reason you're opposed to C++?
From the first line on the GLUI page: "GLUI is a GLUT-based C++..." :)
;)
I didn't like any of the openGL GUI packages out there so I made my own. It really isn't difficult to draw your own textured QUADs etc over the top of the scene. You can push/pop the attributes as well as the projection matrix, so you can make sure lighting etc is turned off when you draw the gui... RTFM
US Democracy:The best person for the job (among These pre-selected choices...)