I'm working on a project to use VTK's mappers to render VTK-m data (already resident on the GPU but not necessarily exposed to OpenGL).
Recently the vtkOpenGLPolyDataMapper was refactored to keep VBOs in the new vtkOpenGLVertexBufferObjectGroup class. This makes using the shaders in the mapper difficult because the buffer-group uploads arrays to the VBOs (which we want to avoid because the arrays are already on the GPU) and creates VBOs (meaning there is no way to create subclass of vtkOpenGLVertexBufferObject that overrides Upload() or something similar).
Do you have any ideas about how we might change the buffer-object-group to allow zero-transfer VTK-m arrays to be handled without uploading them? Perhaps we could add a method to vtkOpenGLVertexBufferObject that visits all the arrays for each VBO it has created?
for (arrayIter bi = this->UsedDataArrays.begin();
bi != this->UsedDataArrays.end(); ++bi)
for (auto ai : bi->second)
visitor(bi->first, this->UsedVBOs[bi->first], ai);
This would get us 90% of the way to VTKm-based mappers (subclasses of vtkOpenGLPolyDataMapper), since we could write a visitor and skip the BuildAllVBOs() call.
Powered by www.kitware.com