Make bit size of depth buffer in vtkOpenGLRenderWindow configurable
In an OpenGL application that we recently ported to VTK 9.3.0 (www.MeVisLab.de), we use vtkExternalOpenGLRenderWindow to render into an existing OpenGL context (which already is a FramebufferObject). The VTK scene is rendered inbetween other render items, thus the content of the external framebuffer needs to be copied to the internal framebuffer, and then back to the external framebuffer.
In this complex application we don't have complete control over the bit size used for the depth buffer of the external OpenGL framebuffer, but if these don't match one gets an OpenGL error, and the blitting fails. vtkOpenGLRenderWindow currently always uses 32 bit depth, but in our case the external OpenGL framebuffer had 24 bit depth (this was with a Radeon card).
I propose to add an interface to select the depth bit size for the framebuffer objects created in vtkOpenGLRenderWindow::CreateFramebuffers.