Tagged: subwindow Toggle Comment Threads | Keyboard Shortcuts

  • Ali BaderEddin 9:33 am on January 27, 2008 Permalink | Reply
    Tags: , , , , subwindow, , viewport,   

    GLUI Subwindow Template 

    This article shows you how to create GUI controls for your OpenGL application and organize them into GLUI subwindows. In this article, we will take the source code from the previous article GLUI Window Template, and modify it so that our GLUI controls will be laid out inside two subwindows rather than in a single window. The reason is that having a separate window to contain our GLUI controls could be sometimes annoying for the user, as she or he will have to lose the focus on the OpenGL context window every time she or he wants to do an action. A nice way to avoid this is to place the GLUI controls directly into the GLUT OpenGL window by embedding them into a GLUI subwindow.

    This article can be used in the following ways:

    • Learn how to use GLUI subwindows
    • Understand the Viewport concept in OpenGl
    • Use the program as a template for your OpenGL applications that require GUI controls

    The image below shows how our controls were laid out into a single GLUI window in the previous article:

    GLUI Window

    The image below shows how our controls will be laid out into two separate subwindows placed on the left and the bottom of our main GLUT window:

    GLUI Subwindow

    Check it out, and let me know your feedback.

    Ali B

    • shule 10:09 am on January 23, 2010 Permalink | Reply

      i need to learn something about GLUI_EditText.i want to write something on the screen.but it doesnt appear on the window what i write.still just inside box.this is the code..
      GLUI_EditText *edittext = glui_window->add_edittext_to_panel(op_panel, “Text:”, GLUI_EDITTEXT_TEXT, &text, EDITTEXT_TEXT, glui_callback);

      what should be to make appear on the window?

  • Ali BaderEddin 7:22 am on January 22, 2008 Permalink | Reply
    Tags: , , , subwindow,   

    GLUT Subwindow Template 

    This article describes in detail how to set up your first OpenGL GLUT window with multiple sub-windows, and provides you with a template for your OpenGL applications. It can be used in the following ways:

    • Understand GLUT sub-windows
    • Learn new GLUT event handlers
    • Use the code as template if you ever needed a Graphics program with multiple sub-windows

    Click below for a screen shot of what the program would look like when its run.


    Make sure you read the GLUT Window Template article as a prerequisite to this article.

    Check it out, and let me know your feedback.

    Ali B

    • bushimports 10:30 am on June 11, 2010 Permalink | Reply

      Hey Ali,I Liked your multiple subwindow totorial,I altered it so I can change the size of the subwindows with the mouse sort of like a split window. I am building my own GUI toolkit from scratch but I don’t seem to be able to get focus
      on the GUI objects with the glut passive mouse if they are in a multiple subwindow setup. Do you know how to do that?
      A tutorial on something like that (with an example program)would be great. Also a tutorial on us using gl selection mechanism to heirarchial picking on points,lines & polygons in 3d(with a good example program).I am also building a 3d modeler/editor. Much Thanks, Jody Bush

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc

Get every new post delivered to your Inbox.

%d bloggers like this: