[vtkusers] Share graphical resources (e.g., VBOs) between multiple vtkRenderWindows

longbowzhang longbowzhangchina at gmail.com
Fri Feb 26 10:32:21 EST 2016

Hello Ken,
Thanks a lot for replying.
I tried to communicate between vtkRenderWindows via low-level
Windows-specific function wglShareLists function.

The whole process is:
Assume we have two vtkRenderWindow objects (rwA, rwB).
HGLRC glrcA = rwA->GetGenericDisplayId();
and exactly after rwB is created, call
glrcB = rwB->GetGenericDisplayId();
wglMakeCurrent(NULL, NULL);
BOOL error = wglShareLists(glrcA , glrcB);

It seems like in this way it can work. I can use VBOs, which was created
under rendering context of renderWindow A, at rendering context

To be honest, I am not 100% sure about correctness.
Based on your vtk developing experience, could you tell if what I've done
make sense?

Thanks again.
Best regards,

View this message in context: http://vtk.1045678.n5.nabble.com/Share-graphical-resources-e-g-VBOs-between-multiple-vtkRenderWindows-tp5736784p5736871.html
Sent from the VTK - Users mailing list archive at Nabble.com.

More information about the vtkusers mailing list