Results 1 to 4 of 4

Thread: 4 glut windows in 1

  1. #1
    Guest

    4 glut windows in 1

    Anyone know how to combine all 4 windows below into one that we can apply transformation to each windows individual or share(1 windows for xy plane, 1 windows for yz plane, 1 windows for xz plan, 1 windows for projection) but have on 1 windows, when you drag, it's move all 4.

    main_window1 = glutCreateWindow( "GLUT Example 1" );
    main_window2 = glutCreateWindow( "GLUT Example 2" );
    main_window3 = glutCreateWindow( "GLUT Example 3" );
    main_window4 = glutCreateWindow( "GLUT Example 4" );

  2. #2
    Member Contributor
    Join Date
    Aug 2001
    Posts
    62

    Re: 4 glut windows in 1

    if im not mistaken this would be done using viewports not windows...

  3. #3
    Guest

    Re: 4 glut windows in 1

    so how do I do it with viewport?

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: 4 glut windows in 1

    Create one large window, then use glViewport to tell OpenGL to draw only to a part of the window. Like this.
    Code :
    // Draw to lower left quarter
    glViewport(0, 0, windowWidth / 2, windowHeight / 2);
    DrawScene();
     
    // Draw to lower right quarter
    glViewport(windowWidth / 2, 0, windowWidth / 2, windowHeight / 2);
    DrawScene();
    And so on, for each quarter.

Similar Threads

  1. GLUT/windows.h
    By KeSh in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 09-13-2004, 12:15 PM
  2. NEED HELP IN GLUT IN WINDOWS!!!
    By alex_r in forum OpenGL: General
    Replies: 0
    Last Post: 08-19-2002, 08:47 AM
  3. GLUT in Windows 95
    By Starpost in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 08-04-2002, 07:12 PM
  4. GLUT two windows?
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-28-2001, 04:14 PM
  5. glut and windows.h
    By dosenpfand in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 07-24-2001, 07:36 AM

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