I have an application that needs to draw the same (moving) image to two separate OpenGL windows.
I cannot call the drawing code itself twice; because it would take too long, but also because that code has side effects that should not happen twice. The solution would seem to be to create an OpenGL Display list, make the normal window current , execute the display list, then make the other window (called 'mirror') current and execute it again. This worked in a GLUT-based version of my application but not in FLTK. Here's the pseudo code I tried: // Share the contexts between the two GL Windows window->make_current(); HGLRC contextW = wglGetCurrentContext(); mirror->make_current(); HGLRC contextM = wglGetCurrentContext(); BOOL result = wglShareLists(contextW,contextM); // result is 1, so display lists should be shared? window->make_current(); glNewList(mainDisplayList,GL_COMPILE); ... CALL THE DRAWING CODE .... glEndList(); glCallList(mainDisplayList); mirror->make_current(); glCallList(mainDisplayList); Does anyone know how why this would not work? Or other suggestions of how to get display lists to work across GLwindows? Thanks, Bart _______________________________________________ fltk-opengl mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-opengl
