From f25016ea4d89cb12c9280da0905d11267d81397e Mon Sep 17 00:00:00 2001 From: ouv Date: Mon, 29 Mar 2010 08:21:52 +0000 Subject: [PATCH] Bug IPAL21655 - Points representation works incorrectly with white background --- src/SVTK/SALOME_Actor.cxx | 12 ++++-------- src/VTKViewer/VTKViewer_PolyDataMapper.cxx | 5 +---- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/SVTK/SALOME_Actor.cxx b/src/SVTK/SALOME_Actor.cxx index 604f25905..6a04c382b 100644 --- a/src/SVTK/SALOME_Actor.cxx +++ b/src/SVTK/SALOME_Actor.cxx @@ -269,15 +269,12 @@ void SALOME_Actor ::AddToRender(vtkRenderer* theRenderer) { - // these two actors have to be added first - // for correct visualization of selection - theRenderer->AddActor( myHighlightActor.GetPointer() ); - theRenderer->AddActor( myPreHighlightActor.GetPointer() ); - Superclass::AddToRender(theRenderer); myRenderer = theRenderer; + theRenderer->AddActor( myPreHighlightActor.GetPointer() ); + theRenderer->AddActor( myHighlightActor.GetPointer() ); theRenderer->AddActor( myOutlineActor.GetPointer() ); theRenderer->AddActor( myNameActor.GetPointer() ); } @@ -289,11 +286,10 @@ void SALOME_Actor ::RemoveFromRender(vtkRenderer* theRenderer) { - theRenderer->RemoveActor( myHighlightActor.GetPointer() ); - theRenderer->RemoveActor( myPreHighlightActor.GetPointer() ); - Superclass::RemoveFromRender(theRenderer); + theRenderer->RemoveActor( myPreHighlightActor.GetPointer() ); + theRenderer->RemoveActor( myHighlightActor.GetPointer() ); theRenderer->RemoveActor( myOutlineActor.GetPointer() ); theRenderer->RemoveActor( myNameActor.GetPointer() ); } diff --git a/src/VTKViewer/VTKViewer_PolyDataMapper.cxx b/src/VTKViewer/VTKViewer_PolyDataMapper.cxx index 6373cd0cd..4b59f6ce5 100644 --- a/src/VTKViewer/VTKViewer_PolyDataMapper.cxx +++ b/src/VTKViewer/VTKViewer_PolyDataMapper.cxx @@ -248,12 +248,9 @@ void VTKViewer_PolyDataMapper::InitPointSprites() glPushAttrib( GL_COLOR_BUFFER_BIT | GL_CURRENT_BIT | GL_DEPTH_BUFFER_BIT | GL_ENABLE_BIT | GL_LIGHTING_BIT ); - glDepthFunc( GL_LESS ); + glDepthFunc( GL_LEQUAL ); glEnable( GL_DEPTH_TEST ); - glEnable( GL_BLEND ); - glBlendFunc( GL_SRC_ALPHA, GL_ONE ); - glEnable( GL_ALPHA_TEST ); glAlphaFunc( GL_GREATER, 0.0 ); -- 2.39.2