View Full Version : GUI
01-04-2006, 10:19 AM
I would like to write a simple GUI with textfields and buttons and so on. Are there are any good tutorials that adress something similar?
01-04-2006, 10:58 AM
I have some GUI code in the example for the water rendering section of this book:
Download the code archive for it, there's no tutorial on the GUI itself though.
Basically you follow mouse events and use it to track input focus (scaled to your viewport). Depending on the widget type you do different things on clicks and movements based on widget/mouse state. And of course you draw the widget in the right place altering appearance to reflect widget state.
01-04-2006, 01:06 PM
Thanks a lot, I'll check it out.
01-05-2006, 02:10 AM
Hmm, I found a directory called "water" in chapter 8, but it doesn't seem to work. There's a directory called "MGLTemplate" which has an executable, but it requires MSVCR71D.dll.
01-05-2006, 05:22 AM
You might also want to note that there already are projects which implement standard GUI functions on top of OpenGL. One of them is GLGooey:
I do not, however, know whether it is currently still being maintained.
You can get the missing dll here:
Nice work, Dorbie! And thanks!
01-05-2006, 08:58 AM
Since the question was about a howto I thought some simple sample code would be preferred, if you actually want a gl based GUI off the shelf then there are obviously better options, something like FLTK for example:
or even PUI:
Sorry about the missing dll, it's a known packaging issue that should have been fixed by now, since it's supposed to be for developers who *should* have a VS.NET dev environment installed I guess it's not seen as critical. The same dll is actually included elsewhere in the code examples.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.