]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fixed bug GVIEW10545 : Frame rate not goob (bis)
authorouv <ouv@opencascade.com>
Fri, 18 Nov 2005 12:02:47 +0000 (12:02 +0000)
committerouv <ouv@opencascade.com>
Fri, 18 Nov 2005 12:02:47 +0000 (12:02 +0000)
src/OBJECT/VISU_GaussPtsAct.cxx
src/PIPELINE/VISU_GaussPointsPL.cxx
src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx

index 199be4ba0008115c2122737844ccfd80d2283016..bdc73dfeb1ce1cc3f7443cecdc72ac6eb691597f 100644 (file)
@@ -987,8 +987,6 @@ VISU_GaussPtsAct1
     myOutsideDeviceActor->SetPipeLine(aPipeLine);
     aPipeLine->Delete();
 
-    myOutsideDeviceActor->GetMapper()->ScalarVisibilityOff();
-
     SALOME_ExtractGeometry* anExtractGeometry = aPipeLine->GetExtractGeometryFilter();
     anExtractGeometry->SetExtractBoundaryCells(true);
     anExtractGeometry->SetExtractInside(true);
index caf885310dc020818b2a1dd0ee3d0bc653bfe49f..7e02f9c8fed5103fa8d9d5388519d6242a4f99bf 100644 (file)
@@ -116,8 +116,6 @@ VISU_GaussPointsPL
   myExtractor->SetInput( GetInput2() );
   myFieldTransform->SetInput( myExtractor->GetOutput() );
 
-  //myPSMapper->SetQuadraticPointDistanceAttenuation( 1.0, 20.0, 0.0 );
-  //myPSMapper->SetImmediateModeRendering( 1 );
   myPSMapper->SetColorModeToMapScalars();
   myPSMapper->ScalarVisibilityOn();
 
index a56d3f4ce10cba7a42e86beac7efcc6ae1a054ed..b2277081a956527e2b579eb467ed5f3aff912e2c 100755 (executable)
@@ -306,6 +306,11 @@ void VISU_OpenGLPointSpriteMapper::SetShaderVariable( const char* variable, floa
 //-----------------------------------------------------------------------------
 void VISU_OpenGLPointSpriteMapper::SetPointSpriteResults( bool theResults )
 {
+  if( theResults )
+    this->ScalarVisibilityOn();
+  else
+    this->ScalarVisibilityOff();
+
   float aResults = theResults ? 1.0 : 0.0;
 
   //cout << "SetPointSpriteResults " << this << " " << aResults << endl;
@@ -426,12 +431,6 @@ void VISU_OpenGLPointSpriteMapper::RenderPiece(vtkRenderer *ren, vtkActor *act)
   // make sure our window is current
   ren->GetRenderWindow()->MakeCurrent();
 
-  // For vertex coloring, this sets this->Colors as side effect.
-  // Color arrays are cached. If nothing has changed,
-  // then the scalars do not have to be regenerted.
-  this->ActorOpacity = act->GetProperty()->GetOpacity();
-  this->MapScalars(this->ActorOpacity);
-
   // Initializing the texture for Point Sprites
   if( this->UseTextures )
     this->InitTextures();
@@ -446,6 +445,9 @@ void VISU_OpenGLPointSpriteMapper::RenderPiece(vtkRenderer *ren, vtkActor *act)
        act->GetProperty()->GetMTime() > this->BuildTime ||
        ren->GetRenderWindow() != this->LastWindow)
   {
+    // sets this->Colors as side effect
+    this->MapScalars( act->GetProperty()->GetOpacity() );
+
     if (!this->ImmediateModeRendering &&
         !this->GetGlobalImmediateModeRendering())
     {
@@ -490,6 +492,8 @@ void VISU_OpenGLPointSpriteMapper::RenderPiece(vtkRenderer *ren, vtkActor *act)
   if (this->ImmediateModeRendering ||
       this->GetGlobalImmediateModeRendering())
   {
+    this->MapScalars( act->GetProperty()->GetOpacity() );
+
     // Time the actual drawing
     this->Timer->StartTimer();
     this->Draw(ren,act);