Have the same problem just like this post.
https://discourse.vtk.org/t/render-to-texture-and-then-use-this-texture-on-another-actor/2667
Render to a texture, and then use this texture on another actor.
We can use vtkWindowToImageFilter to finish the task. However I take a look at the source code and find vtkWindowToImageFilter copy the buffer from GPU memory to CPU memory, then we can use this CPU image on another actor( which I believe copy the buffer from CPU memory to GPU memory in the background). Is there any way to skip the GPU to CPU process and directy use the GPU image buffer on another actor?
I find some tests and examples related to vtkOpenGLRenderer and vtkOpenGLTexture, which can finish the task. However, I find it’s ok to use vtkOpenGLTexture in the same vtkRenderWindow, but failed applying to a different vtkRenderingWindow.
The application break with some console output:
Assertion failed: this->Handle, file D:\CPlusLib\VTK-8.2.0\Rendering\OpenGL2\vtkTextureObject.cxx, line 440
What we want to achieve is rendering some stuff in a vtkRenderWindow offscreen, and then applying this render buffer on a plane actor in another vtkRenderWindow which users can interact. We used vtkWindowToImageFilter as one solution but find it not so fluently, so we need to find some GPU solution to conquer the problem.