]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Bug IPAL21655 - Points representation works incorrectly with white background
authorouv <ouv@opencascade.com>
Mon, 29 Mar 2010 08:21:52 +0000 (08:21 +0000)
committerouv <ouv@opencascade.com>
Mon, 29 Mar 2010 08:21:52 +0000 (08:21 +0000)
src/SVTK/SALOME_Actor.cxx
src/VTKViewer/VTKViewer_PolyDataMapper.cxx

index 604f2590555ac223b030e95d2755e8d7826c81fa..6a04c382b4a5d2ef6f7e02d9d9a993b332d9a31e 100644 (file)
@@ -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() );
 }
index 6373cd0cd936d7efe5a73ef31dafb91fee9e7bf3..4b59f6ce50656e51b59d58c1ef944aa448a5cf77 100644 (file)
@@ -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 );