any way to just render a vtkTextureObject in a viewport?

any way to just render a vtkTextureObject in a viewport? the texture is dynamic from another viewport, eg. render the depthBuffer of the main scene in another viewport

Hello @gpu

The vtkOpenGLRenderUtilities class might offer assistance in this context. However, as I pointed out in your other question, it’s significantly more straightforward to debug the depth buffer using developer tools like Renderdoc rather than attempting to manage it within your code. Debugging depth buffer-related issues can be complex due to the need to handle diverse depth attachment formats, accessing the texture, configuring a sampler for the shader program to render the depth texture, and more.

If you happen to already have the depth buffer texture object, then you may be interested in using vtkOpenGLRenderWindow::TextureDepthBlit (vtkTextureObject* source, int srcX, int srcY, int srcX2, int srcY2, int destX, int destY, int destX2, int destY2)

thanks! i treid inherit from vtkRenderPass, but the viewport the pass render into isNot the same as the setting viewport to the render…still working