Results 1 to 3 of 3

Thread: 2 Window Generation

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2002
    Location
    brisbane
    Posts
    2

    2 Window Generation

    how do i display 2 windows at the same time, generated from within one program?I have created a rectangle in one and a triangle in another window.?Thank u

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Cardiff University
    Posts
    653

    Re: 2 Window Generation

    How do you create the windows or choose them for redrawing or?......

  3. #3
    Member Contributor
    Join Date
    Jul 2002
    Location
    Seri Kembangan, Selangor, Malaysia
    Posts
    92

    Re: 2 Window Generation

    try to use 2 viewports at the render function..

    glClear....;
    glClearColor...;
    glViewport(0,0,1024,76;
    glPushMatrix();
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluPerspective();
    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();
    SetupCamera ();
    DrawObject();
    glPopMatrix();

    glViewport(400,690,230,70);
    glPushMatrix();
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluPerspective();
    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();
    SetupCamera2();
    DrawObject2();
    glPopMatrix();

    glFlush();
    glutSwapBuffers();

    I think that should be work..

Similar Threads

  1. Replies: 4
    Last Post: 01-19-2019, 10:45 PM
  2. Window is redrawn inside the OpenGL area instead of the whole window
    By Visual act in forum OpenGL: User Software
    Replies: 0
    Last Post: 09-18-2015, 06:31 AM
  3. Ray generation problem
    By SuperCraggs in forum OpenGL: Advanced Coding
    Replies: 8
    Last Post: 02-19-2009, 05:39 PM
  4. Attaching a glut window to window's window
    By jowins in forum OpenGL: Windows
    Replies: 2
    Last Post: 11-17-2005, 02:24 AM
  5. overlay a semi-transparent window on an OpenGL window
    By Coconut in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 02-17-2002, 07:01 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