// Hard-coded value of shape deflection coefficient for VTK viewer
const double VTK_MIN_DEFLECTION = 0.001;
+#if OCC_VERSION_LARGE > 0x06070000
// Pixmap caching support
namespace
{
}
}
}
+#endif
//================================================================
// Function : getActiveStudy
aImagePath = propMap.value( GEOM::propertyName( GEOM::Texture ) ).toString();
}
- Handle(Image_PixMap) aPixmap;
- if ( !aImagePath.isEmpty() )
- aPixmap = cacheTextureFor( aImagePath, AISShape );
+ if ( !aImagePath.isEmpty() ) {
+#if OCC_VERSION_LARGE > 0x06070000
+ Handle(Image_PixMap) aPixmap = cacheTextureFor( aImagePath, AISShape );
- // apply image to shape
- if ( !aPixmap.IsNull() ) {
- AISShape->SetTexturePixMap( aPixmap );
+ // apply image to shape
+ if ( !aPixmap.IsNull() ) {
+ AISShape->SetTexturePixMap( aPixmap );
+ AISShape->SetTextureMapOn();
+ AISShape->DisableTextureModulate();
+ }
+ else
+ AISShape->SetTextureMapOff();
+#else
+ AISShape->SetTextureFileName( TCollection_AsciiString( aImagePath.toUtf8().constData() ) );
AISShape->SetTextureMapOn();
AISShape->DisableTextureModulate();
+#endif
}
else
AISShape->SetTextureMapOff();
UpdateColorScale(false,false);
}
+#if OCC_VERSION_LARGE > 0x06070000
void GEOM_Displayer::BeforeErase( SALOME_View* v, const SALOME_OCCPrs* p )
{
LightApp_Displayer::BeforeErase( v, p );
releaseTextures( p );
}
+#endif
void GEOM_Displayer::AfterErase( SALOME_View* v, const SALOME_OCCPrs* p )
{
#include <LightApp_Study.h>
#include <Aspect_TypeOfMarker.hxx>
#include <TCollection_AsciiString.hxx>
-
+#include <Basics_OCCTVersion.hxx>
#include <QList>
#include <list>
virtual void Update( SALOME_VTKPrs* );
virtual void BeforeDisplay( SALOME_View*, const SALOME_OCCPrs* );
virtual void AfterDisplay ( SALOME_View*, const SALOME_OCCPrs* );
+#if OCC_VERSION_LARGE > 0x06070000
virtual void BeforeErase ( SALOME_View*, const SALOME_OCCPrs* );
+#endif
virtual void AfterErase ( SALOME_View*, const SALOME_OCCPrs* );
/* This methos is used for activisation/deactivisation of objects to be displayed*/