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 4 of 4

Thread: resizing subwindow

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2013
    Posts
    29

    resizing subwindow

    I have an existing subwindow that is to be replaced by a different one.
    Should I destroy the original and then create a new one, or merely change the size of the existing one?
    How do I change the size of a subwindow? glViewport(...) does not seem to affect the existing window.

  2. #2
    Junior Member Newbie
    Join Date
    May 2013
    Location
    Germany
    Posts
    8
    What windowing system do you use?
    The function glViewport(...) is used for the transformation of normalized device coordinates to window coordinates (see MSGN for further info).

  3. #3
    Junior Member Newbie
    Join Date
    Nov 2013
    Posts
    29
    The window was created with
    subWindow = glutCreateSubWindow(mainWindow, margin, margin, width, height);
    glViewport(0, 0, (GLsizei) width, (GLsizei) height);

    Basically, I want to change width & height.

    Quote Originally Posted by Lighttec View Post
    What windowing system do you use?
    The function glViewport(...) is used for the transformation of normalized device coordinates to window coordinates (see MSGN for further info).

  4. #4
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,947
    This is a GLUT question not an OpenGL question.

    After you have created a subwindow you can use glutSetWindow and glutPositionWindow and glutReshapeWindow on the subwindow to adjust what you need.

Posting Permissions

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