Commit 5cb7329c authored by Frédéric Larue's avatar Frédéric Larue

Bug fixed in the display of mesh texel selection when wireframe display mode is enabled.

parent 0b0e357c
......@@ -197,15 +197,18 @@ void SelectionManagerMeshTexels::onDisplay( GLViewer *viewer,
GLboolean isBlendEnabled = glIsEnabled( GL_BLEND );
GLint blendSrcRGB, blendDstRGB, blendSrcAlpha, blendDstAlpha;
GLint polygonMode[2];
glGetIntegerv( GL_BLEND_SRC_RGB , &blendSrcRGB );
glGetIntegerv( GL_BLEND_DST_RGB , &blendDstRGB );
glGetIntegerv( GL_BLEND_SRC_ALPHA, &blendSrcAlpha );
glGetIntegerv( GL_BLEND_DST_ALPHA, &blendDstAlpha );
glGetIntegerv( GL_POLYGON_MODE, polygonMode );
// Setup OpenGL states.
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
// Setup selection display shader uniforms.
......@@ -225,6 +228,9 @@ void SelectionManagerMeshTexels::onDisplay( GLViewer *viewer,
// Restore previous OpenGL state.
glPolygonMode( GL_FRONT, polygonMode[0] );
glPolygonMode( GL_BACK , polygonMode[1] );
if( !isBlendEnabled )
glDisable( GL_BLEND );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment