Questions about how to achieve fast pre selection

Hello, I am a student, and I am trying to use vtk to render and select from more than one million units model.
After reading this article:

I am very interested in the feature of fast preselection. I tried to use the method of the vtkOpenGLIndexBufferObject class, and got the IndexBufferObject corresponding to the result of the HardwareSelector selection from vtkOpenGLPolyDataMapper. But I am not sure how to use this IndexBufferObject (Besides, I am not sure whether the extracted IndexBufferObject is correct). Therefore, I would like to ask how to use IndexBufferObject and VertexBufferObject to render and change the color of the rendered object.

You can take a look into ParaView implementation here:

1 Like

Thank you for your reply sincerely! :smiley: I checked this code, and here are some of my thoughts. I think it may be using methods such as HardwareSelector to select some things, and then use UpdateVTKObjects to update them. But I didn’t find any operation related to openglbuffer-according to my understanding, I think this is the key to achieve fast pre-selection. Similarly, I did not find any operation for the rendering pipeline. Does the pre-selected object create an actor? How does it change the color of the preselected part? If possible, I hope to get more tips.