Results 1 to 4 of 4

Thread: resizing subwindow

  1. #1
    Member Newbie
    Join Date
    Apr 2014
    Posts
    47

    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
    Member Newbie
    Join Date
    Apr 2014
    Posts
    47
    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 imported_dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,966
    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.

Similar Threads

  1. Can't reshape subwindow
    By wmelgaard in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 09-30-2015, 11:21 AM
  2. Subwindow with transparent background
    By Atul Agarwal in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 06-11-2009, 04:54 AM
  3. Draw a border around a 3d subwindow
    By David Doria in forum OpenGL: Basic Coding
    Replies: 12
    Last Post: 09-07-2008, 03:11 PM
  4. Subwindow slows my app
    By t3jem in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 06-12-2005, 11:25 PM
  5. Glut subwindow
    By glcrazy in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 02-23-2004, 12:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean