1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0024131: TKOpenGL redesign GPU memory management for markers presentation

Introduce Point Sprites usage.
Graphic3d_Group - drop Marker(),MarkerSet() methods - markers should be drawn using AddPrimitiveArray.
Added new Draw Harness commands vcaps, vmarkerstest.
This commit is contained in:
kgv
2013-08-30 20:37:02 +04:00
committed by bugmaster
parent aabe3a17dd
commit a577aaabf9
68 changed files with 3256 additions and 2699 deletions

View File

@@ -11,7 +11,7 @@ Sample2D_Markers::Sample2D_Markers (const Quantity_Length theXPosition ,
const Aspect_TypeOfMarker theMarkerType,
const Quantity_Color theColor,
const Standard_Real theScaleOrId)
:AIS_InteractiveObject(),myListVertex(1,1)
:AIS_InteractiveObject(),myArrayOfPoints (new Graphic3d_ArrayOfPoints (1))
{
myXPosition = theXPosition;
myYPosition = theYPosition;
@@ -22,18 +22,18 @@ Sample2D_Markers::Sample2D_Markers (const Quantity_Length theXPosition ,
Sample2D_Markers::Sample2D_Markers (const Quantity_Length theXPosition ,
const Quantity_Length theYPosition ,
const Graphic3d_Array1OfVertex& theListVertex,
const Handle(Graphic3d_ArrayOfPoints)& theArrayOfPoints,
const Aspect_TypeOfMarker theMarkerType,
const Quantity_Color theColor,
const Standard_Real theScaleOrId)
:AIS_InteractiveObject(),myListVertex(1,6)
:AIS_InteractiveObject(),myArrayOfPoints (new Graphic3d_ArrayOfPoints (6))
{
myXPosition = theXPosition;
myYPosition = theYPosition;
myMarkerType = theMarkerType;
myColor = theColor;
myIndex = theScaleOrId;
myListVertex = theListVertex;
myArrayOfPoints = theArrayOfPoints;
}
@@ -45,13 +45,14 @@ void Sample2D_Markers::Compute ( const Handle(PrsMgr_PresentationManager3d)& aP
{
Handle(Graphic3d_AspectMarker3d) aMarker = new Graphic3d_AspectMarker3d(Aspect_TOM_POINT,myColor,myIndex);
Prs3d_Root::CurrentGroup(aPresentation)->SetGroupPrimitivesAspect(aMarker);
Prs3d_Root::CurrentGroup(aPresentation)->MarkerSet(myListVertex);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (myArrayOfPoints);
}
else
{
Handle(Graphic3d_AspectMarker3d) aMarker = new Graphic3d_AspectMarker3d(myMarkerType,myColor,myIndex);
aPresentation->SetPrimitivesAspect(aMarker);
Graphic3d_Vertex aV3d(myXPosition, myYPosition, 0.);
Prs3d_Root::CurrentGroup(aPresentation)->Marker(aV3d);
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints->AddVertex (myXPosition, myYPosition, 0);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
}
}