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


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

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.

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).]

why don’t ypu make just one window, an seperate the 4 parts with a Scissor Test.


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
Do I now have to abandon GLUT ???