PDA

View Full Version : Multi-windows and GLUT: different OpenGL context for each window!



Mr.Freeze
08-16-2001, 11:26 PM
Hi,

I want to have 4 windows with 4 different views of the same scene. GLUT associates different OpenGL contexts for each window so that I have to specify everything 4 times (eg. create 4 times a display list of the same object or load 4 times the same texture).
How can I avoid doing everything 4 times????
Can I have one unique OpenGL context for all 4 windows at the same time?
Thanks for your help http://www.opengl.org/discussion_boards/ubb/smile.gif

Bob
08-17-2001, 12:42 AM
I don't think it's possible to have one context on several windows. To simulate four windows with one context, you can create one window, and split it into four viewports. You then only need one displaylist for each object, since there's only one context. However, you still need to draw them four times, one for each viewport.

richardve
08-17-2001, 03:21 AM
You can create 4 contexts and share displists/texture objects with wglShareLists()..

But I don't know if it's possible to use that with GLUT...
(I don't use GLUT)


[This message has been edited by richardve (edited 08-17-2001).]

DaViper
08-17-2001, 05:10 AM
why don't ypu make just one window, an seperate the 4 parts with a Scissor Test.

Chris

Mr.Freeze
08-17-2001, 03:33 PM
Using 4 viewports in one window works fine, but for my application I should have 4 separate windows. And I read somewhere that GLUT does not allow display list sharing http://www.opengl.org/discussion_boards/ubb/frown.gif
Do I now have to abandon GLUT ????