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

Thread: I want to draw onto multiple forms.

  1. #1
    Junior Member Regular Contributor
    Join Date
    Aug 2002
    Location
    Tulsa,OK
    Posts
    113

    I want to draw onto multiple forms.

    I want to have two or mor opengl graphs going at the same time. How can I do this?

  2. #2
    Junior Member Newbie
    Join Date
    Sep 2002
    Location
    England
    Posts
    3

    Re: I want to draw onto multiple forms.

    You can in Linux, friend, but as far as Windows is concerned... can't help you. I haven't got the foggiest - but try setting up the rendering context again for a different window?
    --The GibberingFool

  3. #3
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,256

    Re: I want to draw onto multiple forms.

    Can you narrow down what you want to do.

    I could just say open the same application a second time.

    V-man
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  4. #4
    Junior Member Regular Contributor
    Join Date
    Aug 2002
    Location
    Tulsa,OK
    Posts
    113

    Re: I want to draw onto multiple forms.

    I want to draw onto two different forms at the same time in the same program. My program has several graphs and models and I need the ability to show more than one at once.

  5. #5

    Re: I want to draw onto multiple forms.

    You need to create a seperate context for each window. Make sure to rebind the context for each window (form) when you're drawing to it. I did this in C++ Builder a long time ago and it worked fine.

  6. #6
    Junior Member Regular Contributor
    Join Date
    Feb 2002
    Posts
    245

    Re: I want to draw onto multiple forms.

    First of all, Mr. John Jenkins, shame on you for double posting. Second of all...well, I don't really have a second point, just "shame on you."

  7. #7
    Intern Contributor
    Join Date
    Aug 2002
    Posts
    87

    Re: I want to draw onto multiple forms.

    if you can, it better to create one big window and simulate multiple windows with glScissor() and glViewport().

    that way you can avoid the expensive context switch... depends how important performance is for your app.

Posting Permissions

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