Applying color and point size (marker type currently ignored).
}
case Aspect_TOM_POINT :
{
- glPointSize( aspect_marker->Scale() );
glBegin( GL_POINTS );
glVertex3fv( myPoint.xyz );
glEnd();
}
case Aspect_TOM_POINT :
{
- glPointSize( aspect_marker->Scale() );
glBegin( GL_POINTS );
for( i = 0, ptr = myPoints; i < myNbPoints; i++, ptr++ )
glVertex3fv( ptr->xyz );
break;
}
- const OpenGl_AspectFace* anAspectFace = theWorkspace->AspectFace (Standard_True);
- const OpenGl_AspectLine* anAspectLine = theWorkspace->AspectLine (Standard_True);
+ const OpenGl_AspectFace* anAspectFace = theWorkspace->AspectFace (Standard_True);
+ const OpenGl_AspectLine* anAspectLine = theWorkspace->AspectLine (Standard_True);
+ const OpenGl_AspectMarker* anAspectMarker = theWorkspace->AspectMarker (myPArray->type == TelPointsArrayType);
Tint aFrontLightingModel = anAspectFace->Context().IntFront.color_mask;
const TEL_COLOUR* anInteriorColor = &anAspectFace->Context().IntFront.matcol;
const TEL_COLOUR* anEdgeColor = &anAspectFace->AspectEdge()->Color();
- const TEL_COLOUR* aLineColor = &anAspectLine->Color();
+ const TEL_COLOUR* aLineColor = (myPArray->type == TelPointsArrayType) ? &anAspectMarker->Color() : &anAspectLine->Color();
// Use highlight colors
if (theWorkspace->NamedStatus & OPENGL_NS_HIGHLIGHT)
/*----------------------------------------------------------------------*/
-const OpenGl_AspectMarker * OpenGl_Workspace::AspectMarker(const Standard_Boolean WithApply)
+const OpenGl_AspectMarker* OpenGl_Workspace::AspectMarker (const Standard_Boolean theToApply)
{
- if ( WithApply && (AspectMarker_set != AspectMarker_applied) )
+ if (theToApply && (AspectMarker_set != AspectMarker_applied))
{
+ if (!AspectMarker_applied || (AspectMarker_set->Scale() != AspectMarker_applied->Scale()))
+ {
+ glPointSize (AspectMarker_set->Scale());
+ #ifdef HAVE_GL2PS
+ gl2psPointSize (AspectMarker_set->Scale());
+ #endif
+ }
AspectMarker_applied = AspectMarker_set;
}
return AspectMarker_set;