Results 1 to 2 of 2

Thread: multiple windows in opengl

  1. #1
    Guest

    multiple windows in opengl

    How do I make multiple windows in opengl, and how do I address them later when I need to update either one?

    [This message has been edited by hmm (edited 11-28-2002).]

  2. #2
    Member Contributor
    Join Date
    Oct 2002
    Location
    bangalore
    Posts
    56

    Re: multiple windows in opengl

    hi HMM,
    i hope u know how to create the first window.
    it is something like this.

    int main(int argc, char **argv)
    {
    glutInit(&argc,argv);
    glutInitWindowSize(1200,900);
    glutInitWindowPosition(0,0);
    pw=glutCreateWindow(" opening first ");
    glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB );
    init();

    glutDisplayFunc(display);
    glutKeyboardFunc(keyboard);
    glutReshapeFunc(reshape);
    glutMouseFunc(mouse);
    glutMainLoop();
    return 0;
    }


    here glutCreateWindow returns the window identifier pw.(parent window).

    now u can create another subwindow using another glut call,
    cw=glutCreateSubWindow(pw,160,120,830,630);

    where in u've to pass the pw to the function.

    this window can be set using ,
    glutSetWindow(cw);

    i hope this is what u want. like one msin window and later on subwindows.

    if u r not looking for this and want to divide ur screnn in to 4 different windows ,u can go for glViewPort().

    hope this helps.
    thanks & regards
    Prashant G.P

Similar Threads

  1. Multiple OpenGL Windows, WIN 32 API (without MFC)
    By scalax in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 09-22-2011, 01:18 PM
  2. Multiple OpenGL windows and textures
    By Majestik in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 09-24-2005, 07:10 PM
  3. OpenGL in multiple windows
    By GeoNova in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 09-26-2003, 09:02 AM
  4. OpenGL in multiple Windows
    By in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 02-14-2003, 07:18 PM
  5. 0n multiple glut/opengl windows in multiple threads
    By kaas in forum OpenGL: Advanced Coding
    Replies: 11
    Last Post: 05-30-2002, 01:55 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