GL_DEPTH_COMPONENT32 in opengl es

Hi,

I’m making an application where I show a vtkImageData in 3D in a QQuickVTKWindow using a vtkSmartVolumeMapper.

As vtk is rendering it, there is a warning displayed : GL_INVALID_OPERATION: glBlitFramebuffer: Depth/stencil buffer format combination not allowed for blit. I traced it to a blit made in vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::CaptureDepthTexture().

The depth format is here given by the texture DepthTextureObject which has her InternalFormat set with :

this->DepthTextureObject->AllocateDepth(this->WindowSize[0], this->WindowSize[1], 4);

The last parameter set the format and “4” means GL_DEPTH_COMPONENT32 which does not exists in opengl es.

Shouldn’t the format be set to GL_DEPTH_COMPONENT24 if it’s in opengl es ?

Hi @Francois_Merle,

Shouldn’t the format be set to GL_DEPTH_COMPONENT24 if it’s in opengl es ?

You probably have right, @LucasGandel you know better than me this codepath, do you confirm?

I was not aware that GL_DEPTH_COMPONENT32 does not exist in OpenGLES (and that QQuickVTKWindow worked with OpenGLES neither TBH).
Changing to GL_DEPTH_COMPONENT24 will work if the render window itself uses GL_DEPTH_COMPONENT24, as we blit its depth buffer into this texture IIRC?
Anyway, the right fix would be to allow this format to be configured from the public API, as I know there can be other format compatibility issues (e.g. when using tone mapping pass with volume rendering).