Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: OpenGL & Menus

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2004
    Posts
    2

    OpenGL & Menus

    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.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Apr 2001
    Location
    U.S.
    Posts
    149

    Re: OpenGL & Menus

    The simplist approach is to use GLUT menus (e.g. glutCreateMenu, glutAddMenuEntry, glutSetMenu, glutAttachMenu, ...).

  3. #3
    Junior Member Regular Contributor
    Join Date
    Apr 2001
    Location
    U.S.
    Posts
    149

    Re: OpenGL & Menus

    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.

  4. #4
    Junior Member Newbie
    Join Date
    Feb 2004
    Posts
    2

    Re: OpenGL & Menus

    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.

  5. #5
    Junior Member Regular Contributor
    Join Date
    Apr 2001
    Location
    U.S.
    Posts
    149

    Re: OpenGL & Menus

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •