mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0023397: Marker aspect doesn't applied to points drawn by Primitive Arrays
Applying color and point size (marker type currently ignored).
This commit is contained in:
parent
420399e331
commit
17f65eb229
@ -52,7 +52,6 @@ void OpenGl_Marker::Render (const Handle(OpenGl_Workspace) &AWorkspace) const
|
|||||||
}
|
}
|
||||||
case Aspect_TOM_POINT :
|
case Aspect_TOM_POINT :
|
||||||
{
|
{
|
||||||
glPointSize( aspect_marker->Scale() );
|
|
||||||
glBegin( GL_POINTS );
|
glBegin( GL_POINTS );
|
||||||
glVertex3fv( myPoint.xyz );
|
glVertex3fv( myPoint.xyz );
|
||||||
glEnd();
|
glEnd();
|
||||||
|
@ -70,7 +70,6 @@ void OpenGl_MarkerSet::Render (const Handle(OpenGl_Workspace) &AWorkspace) const
|
|||||||
}
|
}
|
||||||
case Aspect_TOM_POINT :
|
case Aspect_TOM_POINT :
|
||||||
{
|
{
|
||||||
glPointSize( aspect_marker->Scale() );
|
|
||||||
glBegin( GL_POINTS );
|
glBegin( GL_POINTS );
|
||||||
for( i = 0, ptr = myPoints; i < myNbPoints; i++, ptr++ )
|
for( i = 0, ptr = myPoints; i < myNbPoints; i++, ptr++ )
|
||||||
glVertex3fv( ptr->xyz );
|
glVertex3fv( ptr->xyz );
|
||||||
|
@ -1615,13 +1615,14 @@ void OpenGl_PrimitiveArray::Render (const Handle(OpenGl_Workspace)& theWorkspace
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const OpenGl_AspectFace* anAspectFace = theWorkspace->AspectFace (Standard_True);
|
const OpenGl_AspectFace* anAspectFace = theWorkspace->AspectFace (Standard_True);
|
||||||
const OpenGl_AspectLine* anAspectLine = theWorkspace->AspectLine (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;
|
Tint aFrontLightingModel = anAspectFace->Context().IntFront.color_mask;
|
||||||
const TEL_COLOUR* anInteriorColor = &anAspectFace->Context().IntFront.matcol;
|
const TEL_COLOUR* anInteriorColor = &anAspectFace->Context().IntFront.matcol;
|
||||||
const TEL_COLOUR* anEdgeColor = &anAspectFace->AspectEdge()->Color();
|
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
|
// Use highlight colors
|
||||||
if (theWorkspace->NamedStatus & OPENGL_NS_HIGHLIGHT)
|
if (theWorkspace->NamedStatus & OPENGL_NS_HIGHLIGHT)
|
||||||
|
@ -598,10 +598,17 @@ const OpenGl_AspectFace * OpenGl_Workspace::AspectFace(const Standard_Boolean Wi
|
|||||||
|
|
||||||
/*----------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------*/
|
||||||
|
|
||||||
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;
|
AspectMarker_applied = AspectMarker_set;
|
||||||
}
|
}
|
||||||
return AspectMarker_set;
|
return AspectMarker_set;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user