Same texture on same object in two different views not working correctly
Applying the same texture to the same object in two different views does not work. This may be related with this VTK issue (see conversation vtk/vtk#18121 (comment 902253)).
Steps to reproduce :
- Create a plane. Apply.
- In the
Display
section, select and load a texture. - Open a new layout (or split the current layout) and select Render View.
- Display the previously created plane.
- Apply the previously loaded texture to the plane in this view.
- Select the first view again.
If the texture has an alpha channel, the plane will not be visible in the first view, with these warnings in the standard output :
( 38.292s) [paraview ] vtkOpenGLState.cxx:166 WARN| Error in cache state for GL_ACTIVE_TEXTURE
( 38.298s) [paraview ] vtkOpenGLState.cxx:274 WARN| at stack loc
0x7f27877e2888 : ??? [(???) ???:-1]
0x7f27877dd355 : vtksys::SystemInformation::GetProgramStack[abi:cxx11](int, int) [(libvtksys-pv5.9.so.1) ???:-1]
0x7f278b642826 : vtkOpenGLState::CheckState() [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
0x7f278b6468cc : vtkOpenGLState::SetEnumState(unsigned int, bool) [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
0x7f278b647db1 : vtkOpenGLState::vtkglDisable(unsigned int) [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
0x7f278b5f7b6d : vtkOpenGLProperty::Render(vtkActor*, vtkRenderer*) [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
0x7f278516be09 : vtkPVLODActor::Render(vtkRenderer*, vtkMapper*) [(libvtkRemotingViews-pv5.9.so.1) ???:-1]
0x7f278ab23f95 : vtkActor::RenderTranslucentPolygonalGeometry(vtkViewport*) [(libvtkRenderingCore-pv5.9.so.1) ???:-1]
0x7f278ac4ccca : vtkProp::RenderFilteredTranslucentPolygonalGeometry(vtkViewport*, vtkInformation*) [(libvtkRenderingCore-pv5.9.so.1) ???:-1]
0x7f278b512a6b : vtkDefaultPass::RenderFilteredTranslucentPolygonalGeometry(vtkRenderState const*) [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
0x7f278b6f7d0a : vtkTranslucentPass::Render(vtkRenderState const*) [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
0x7f278b51c425 : vtkDualDepthPeelingPass::RenderTranslucentPass() [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
0x7f278b51f7c6 : vtkDualDepthPeelingPass::PeelTranslucentGeometry() [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
0x7f278b51e5da : vtkDualDepthPeelingPass::Peel() [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
0x7f278b51a0fe : vtkDualDepthPeelingPass::Render(vtkRenderState const*) [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
[...]
If the texture does not have an alpha channel, the display will work correctly with the following warning int the standard output :
( 329.839s) [paraview ] vtkOpenGLState.cxx:83 WARN| Error in cache state for GL_BLEND
( 329.839s) [paraview ] vtkOpenGLState.cxx:90 WARN| Error in cache state for GL_DEPTH_TEST
( 329.839s) [paraview ] vtkOpenGLState.cxx:113 WARN| Error in cache state for GL_SCISSOR_TEST
( 329.839s) [paraview ] vtkOpenGLState.cxx:152 WARN| Error in cache state for GL_SCISSOR_BOX
( 329.839s) [paraview ] vtkOpenGLState.cxx:180 WARN| Error in cache state for GL_BLEND_SRC_RGB
( 329.839s) [paraview ] vtkOpenGLState.cxx:208 WARN| Error in cache state for GL_DRAW_FRAMEBUFFER_BINDING
( 329.843s) [paraview ] vtkOpenGLState.cxx:274 WARN| at stack loc
0x7f27877e2888 : ??? [(???) ???:-1]
0x7f27877dd355 : vtksys::SystemInformation::GetProgramStack[abi:cxx11](int, int) [(libvtksys-pv5.9.so.1) ???:-1]
0x7f278b642826 : vtkOpenGLState::CheckState() [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
0x7f278b6460b5 : vtkOpenGLState::vtkglActiveTexture(unsigned int) [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
0x7f278b64a207 : vtkOpenGLState::ActivateTexture(vtkTextureObject*) [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
0x7f278b61af9b : vtkOpenGLRenderWindow::ActivateTexture(vtkTextureObject*) [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
0x7f278b6d9b48 : vtkTextureObject::Activate() [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
0x7f278b65a33f : vtkOpenGLTexture::Load(vtkRenderer*) [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
0x7f278acbbe56 : vtkTexture::Render(vtkRenderer*) [(libvtkRenderingCore-pv5.9.so.1) ???:-1]
0x7f278b6588e8 : vtkOpenGLTexture::Render(vtkRenderer*) [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
0x7f278516bf92 : vtkPVLODActor::Render(vtkRenderer*, vtkMapper*) [(libvtkRemotingViews-pv5.9.so.1) ???:-1]
0x7f278516c2e1 : vtkPVLODActor::RenderOpaqueGeometry(vtkViewport*) [(libvtkRemotingViews-pv5.9.so.1) ???:-1]
0x7f278ac8ba0e : vtkRenderer::UpdateOpaquePolygonalGeometry() [(libvtkRenderingCore-pv5.9.so.1) ???:-1]
0x7f278ac8a7d3 : vtkRenderer::DeviceRenderOpaqueGeometry(vtkFrameBufferObjectBase*) [(libvtkRenderingCore-pv5.9.so.1) ???:-1]
0x7f278b61fe7a : vtkOpenGLRenderer::DeviceRenderOpaqueGeometry(vtkFrameBufferObjectBase*) [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
0x7f278b61f076 : vtkOpenGLRenderer::UpdateGeometry(vtkFrameBufferObjectBase*) [(libvtkRenderingOpenGL2-pv5.9.so.1) ???:-1]
0x7f278ac68f4c : vtkRenderPass::UpdateGeometry(vtkRenderer*, vtkFrameBufferObjectBase*) [(libvtkRenderingCore-pv5.9.so.1) ???:-1]
[...]
If a new plane is displayed in each view we have the correct behavior. Also if we load a different texture for each view then we also have a correct behavior.
Here's two image to test (one with transparency and one plain image) :