Tagged: window Toggle Comment Threads | Keyboard Shortcuts

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

    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.

    Enjoy!
    Ali B

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

      hi,
      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 6:07 pm on January 25, 2008 Permalink | Reply
    Tags: , control, , , , GUI, , , window   

    GLUI Window Template 


    This article describes in detail how to create your first GLUI window with some basic controls inside it, and provides you with a template for your OpenGL applications.

    When OpenGL applications get more complex, we need something more than a GLUT mouse, keyboard, and\or popup menus to interact with our OpenGL objects drawn on the window. GLUI gives us more flexibility by allowing us to add GUI components to interact with our OpenGL objects, such as buttons, check boxes, radio buttons, spinners, list boxes, lists, trees, file browsers, text fields, text areas, and the special controls: rotation and translation.

    This article can be used in the following ways:

    • Learn how to add GUI components to your OpenGL application in a very straight-forward and simple manner, through
      • Documentation
      • Interactive Program that displays to the user how every event is handled and classifies these events into GLUT and GLUI events.
      • Neat and commented Code that reflects the simplicity of the GLUI library
    • Learn some totally new controls in the GLUI library created specifically for graphical manipulation, such as the rotation and translation controls.
    • Use the code as a template for your OpenGL applications.

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

    GLUI Window Template

    Make sure you read the GLUT Window Template article as a prerequisite to this article. One important thing to note is that GLUI is a C++ library, which means that your code must be written in files with .cpp extension rather than .C, or otherwise the linker will complain.

    Check it out, and let me know your feedback.

    Enjoy!
    Ali B

     
    • R. Srivatsan 4:28 pm on June 28, 2008 Permalink | Reply

      Dear Ali,

      Thank you very much for this GLUI window template code. I could make it run in OpenGL Mesa in Fedora linux as well. It really gave me a quick start GUI which I am able to grasp very fast. The entire article was lucidly written, and fantastic!. Thanks to you again. It is very easy to learn further from this article.

      R. Srivatsan

      (Bangalore, India).

  • Ali BaderEddin 4:15 am on January 20, 2008 Permalink | Reply
    Tags: , , , , window   

    GLUT Window Template 


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

    • Learn GLUT and OpenGL through
      • Interactive Program
      • Documentation
      • Source Code
    • Start your first OpenGL program
    • Use the code as a template for your OpenGL applications

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

    GLUT Window Template

    Make sure you at least read the “Running the Program” section of the documentation before you complain about the program not running.

    Check it out, and let me know your feedback.

    Enjoy!
    Ali B

     
    • HARI 10:40 pm on June 18, 2013 Permalink | Reply

      Hi ,

      you have written a great tutorial.

      I have created an android app for drawing of lines,circles.. by using
      GLSurfaceView in OpenGLES 2.0 like an Auto cad app.
      The app works well with Google Nexus 7, in the sense that
      if we draw a line & then a circle the line doesn’t get erased
      in surface view. But with Samsung Galaxy
      Note II, it is entirely different.
      The line previously drawn before a circle being drawn, gets erased.
      i.e., each time if we draw a new line or circle, the previous one
      gets erased.I can draw only one image at a time.
      What I need is the same output which I
      get in Google Nexus 7 in Samsung Galaxy Note II.
      i.e.I want to draw more than one image in
      the GLSurfaceView at a time.
      Note :
      Both the Android OS in Google Nexus 7 and Samsung Galaxy Note II
      are Jelly Bean 4.2. But both devices are different GPU.
      Google Nexus 7 GPU is ULP GeForce &
      Samsung Galaxy Note II is Mali400MP.

      Would this be an issue in the rendering of output of the
      Surfaceview ?

      Should we take into account of GPU while Coding ?

      Can you tell me why this problem of different output in
      different devices ?

c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: