this->TotalCells = 0;
this->ActorOpacity = 0;
this->ExtensionsInitialized = 0;
- this->DefaultPointSize = 50.0;
+ this->DefaultPointSize = 20.0;
this->UsePointSprites = true;
this->UseTextures = true;
cout << "Loading vertex program... failed" << endl << endl;
*/
free( shader );
-
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
- glTranslatef( 0.0f, 0.0f, -4.0f );
- glRotatef( 0.0f, 1.0f, 0.0f, 0.0f );
- glRotatef( 0.0f, 0.0f, 1.0f, 0.0f );
}
//-----------------------------------------------------------------------------
void VISU_OpenGLPointSpriteMapper::SetShaderVariable( const char* variable, float value )
if( !this->ExtensionsInitialized && !this->UseOpenGLMapper )
{
this->InitExtensions();
- act->GetProperty()->SetPointSize( 10.0f );
+ act->GetProperty()->SetPointSize( 1.0f );
}
if( this->UseOpenGLMapper )
//-----------------------------------------------------------------------------
float VISU_OpenGLPointSpriteMapper::GetMaximumSupportedSize()
{
- float maximumSupportedSize = 300.0;
+ float maximumSupportedSize = 512.0;
//glGetFloatv( GL_POINT_SIZE_MAX_ARB, &maximumSupportedSize );
return maximumSupportedSize;
//-----------------------------------------------------------------------------
void VISU_OpenGLPointSpriteMapper::CleanupPointSprites()
{
- // Set GL params back to normal to stop other vtkMappers diusplaying wrongly
+ // Set GL params back to normal to stop other vtkMappers displaying wrongly
glDisable( GL_ALPHA_TEST );
glEnable( GL_BLEND );
virtual int Draw(vtkRenderer *ren, vtkActor *a);
//! Return the maximum point size supported by the graphics hardware.
- float GetMaximumSupportedSize();
+ static float GetMaximumSupportedSize();
//! Set usage of #vtkOpenGLPolyDataMapper.
/*!
#include "VISU_GaussPoints_i.hh"
#include "VISU_GaussPointsPL.hxx"
+#include "VISU_OpenGLPointSpriteMapper.hxx"
#include "VISU_Convertor.hxx"
#include "SalomeApp_Application.h"
QLabel* aClampLabel = new QLabel( tr( "MAXIMUM_SIZE" ), PrimitiveGroup );
myClampSpinBox = new QtxDblSpinBox( 1.0, 512.0, 1.0, PrimitiveGroup );
myClampSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ myClampSpinBox->setMaxValue( VISU_OpenGLPointSpriteMapper::GetMaximumSupportedSize() );
PrimitiveGroupLayout->addWidget( aClampLabel, 1, 0 );
PrimitiveGroupLayout->addMultiCellWidget( myClampSpinBox, 1, 1, 1, 2 );
myColorButton->setPaletteBackgroundColor( thePrs->GetColor() );
- myClampSpinBox->setMaxValue( thePrs->GetMaximumSupportedSize() );
myClampSpinBox->setValue( thePrs->GetClamp() );
-
mySizeSpinBox->setValue( thePrs->GetConstSize() );
myMinSizeSpinBox->setValue( thePrs->GetMinSize() );
myMaxSizeSpinBox->setValue( thePrs->GetMaxSize() );
-
myMagnificationSpinBox->setValue( thePrs->GetMagnification() );
myIncrementSpinBox->setValue( thePrs->GetMagnificationIncrement() );
#include "VISU_ImplicitFunctionWidget.h"
#include "VISU_GaussPointsPL.hxx"
+#include "VISU_OpenGLPointSpriteMapper.hxx"
#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
QLabel* ClampLabel = new QLabel( tr( "MAXIMUM_SIZE" ), PrimitiveGroup );
myClampSpinBox = new QtxDblSpinBox( 1.0, 512.0, 1.0, PrimitiveGroup );
myClampSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ myClampSpinBox->setMaxValue( VISU_OpenGLPointSpriteMapper::GetMaximumSupportedSize() );
PrimitiveGroupLayout->addWidget( ClampLabel, 1, 0 );
PrimitiveGroupLayout->addMultiCellWidget( myClampSpinBox, 1, 1, 1, 2 );
void VVTK_SegmentationCursorDlg::UpdateOutsideCursor()
{
- float aClamp = 200.0;
+ float aClamp = 256.0;
QString aMainTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_texture.bmp";
QString anAlphaTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_alpha.bmp";
float anAlphaThreshold = 0.1;