PDA

View Full Version : OpenGL & Menus



lina2401
02-23-2004, 07:58 AM
Iím facing a problem with this application and Iím wondering if anyone can help!!
Here is the scenario, I need to draw a picture and do some transformation operations on it (translation, rotation, & scaling) now the application should be implemented in a way so that the user can select the operation from a menu (or by pressing a particular key) and enter the proper values in a text field which should show up!!
Now the question HOW can this be implemented using OpenGL?? Can OpenGL handle such menuís events??

Thanks in advance.

brcain
02-23-2004, 10:58 AM
The simplist approach is to use GLUT menus (e.g. glutCreateMenu, glutAddMenuEntry, glutSetMenu, glutAttachMenu, ...).

brcain
02-23-2004, 11:03 AM
For keyboard inputs see glutKeyboardFunc.
For a more sophisticated solution that explicitly supports GUI widgets (e.g. textfields, menus), you might want to use MFC ... or wxWindows for portable solution.

lina2401
02-23-2004, 11:25 AM
Thanks for replying!
Actually I'm not familiar with MFC and wxWindows so would you please provide me with more details on them and how can I use them with OpenGL??
Thanks.

brcain
02-23-2004, 12:36 PM
wxWindows is an open source C++ cross-platform GUI framework that supports Windows, Unix, Linux, and MacOS. For more information, see http://www.wxwindows.org/.

Depending upon my needs, if I didn't already know MFC, I'd just look at wxWindows instead.