Framework for sharing OpenGL resources between several vtkOpenGLRenderWindows
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Examples of application:
-
several vtkRenderWindows, each one representing a different view point of the same scene: you want to share the resources (textures,shader program, framebuffer object, buffer objects, display lists).
-
Or different views of the same volume: share the 3D texture but show a different slice on each view. It only makes sense if there is a view using the whole 3D textures as it might less expensive to just load 2 2D textures to the VRAM.
Benefit of sharing resources: saving memory. Drawback: some synchronization mechanism might be necessary (not in the sense of multithreading, but in the sense of make sure everybody is up-to-date about the shared resources).
None of the case above require multithreading. It can be done in one GUI thread, iterating over each vtkRenderWindow and changing its current OpenGL context.