0022819: Redesign of OpenGl driver
[occt.git] / src / OpenGl / OpenGl_GraphicDriver_711.cxx
1 // File:      OpenGl_GraphicDriver_711.cxx
2 // Created:   20 October 2011
3 // Author:    Sergey ZERCHANINOV
4 // Copyright: OPEN CASCADE 2011
5
6 #include <OpenGl_GraphicDriver.hxx>
7
8 #include <OpenGl_Group.hxx>
9 #include <OpenGl_TriangleStrip.hxx>
10 #include <OpenGl_Mesh.hxx>
11
12 void OpenGl_GraphicDriver::TriangleMesh (const Graphic3d_CGroup& ACGroup,
13                                         const Graphic3d_Array1OfVertex& ListVertex,
14                                         const Standard_Boolean ) 
15 {
16   if (ACGroup.ptrGroup)
17   {
18     OpenGl_TriangleStrip *atstrip = new OpenGl_TriangleStrip( ListVertex );
19     ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelTriangleMesh, atstrip );
20   }
21 }
22
23 void OpenGl_GraphicDriver::TriangleMesh (const Graphic3d_CGroup& ACGroup,
24                                         const Graphic3d_Array1OfVertexN& ListVertex,
25                                         const Standard_Boolean ) 
26 {
27   if (ACGroup.ptrGroup)
28   {
29     OpenGl_TriangleStrip *atstrip = new OpenGl_TriangleStrip( ListVertex );
30     ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelTriangleMesh, atstrip );
31   }
32 }
33
34 void OpenGl_GraphicDriver::TriangleMesh(const Graphic3d_CGroup& ACGroup,
35                                        const Graphic3d_Array1OfVertexNT& ListVertex,
36                                        const Standard_Boolean ) 
37 {
38   if (ACGroup.ptrGroup)
39   {
40     OpenGl_TriangleStrip *atstrip = new OpenGl_TriangleStrip( ListVertex );
41     ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelTriangleMesh, atstrip );
42   }
43 }
44
45 void OpenGl_GraphicDriver::TriangleSet (const Graphic3d_CGroup& ACGroup,
46                                        const Graphic3d_Array1OfVertex& ListVertex,
47                                        const Aspect_Array1OfEdge& ListEdge,
48                                        const Standard_Boolean ) 
49 {
50   if (ACGroup.ptrGroup)
51   {
52     OpenGl_Mesh *amesh = new OpenGl_Mesh (ListVertex, ListEdge);
53     ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelPolygonIndices, amesh );
54   }
55 }
56
57 void OpenGl_GraphicDriver::TriangleSet (const Graphic3d_CGroup& ACGroup,
58                                        const Graphic3d_Array1OfVertexN& ListVertex,
59                                        const Aspect_Array1OfEdge& ListEdge,
60                                        const Standard_Boolean ) 
61 {
62   if (ACGroup.ptrGroup)
63   {
64     OpenGl_Mesh *amesh = new OpenGl_Mesh (ListVertex, ListEdge);
65     ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelPolygonIndices, amesh );
66   }
67 }
68
69 void OpenGl_GraphicDriver::TriangleSet (const Graphic3d_CGroup& ACGroup,
70                                        const Graphic3d_Array1OfVertexC& ListVertex,
71                                        const Aspect_Array1OfEdge& ListEdge,
72                                        const Standard_Boolean ) 
73 {
74   if (ACGroup.ptrGroup)
75   {
76     OpenGl_Mesh *amesh = new OpenGl_Mesh (ListVertex, ListEdge);
77     ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelPolygonIndices, amesh );
78   }
79 }
80
81 void OpenGl_GraphicDriver::TriangleSet (const Graphic3d_CGroup& ACGroup,
82                                        const Graphic3d_Array1OfVertexNC& ListVertex,
83                                        const Aspect_Array1OfEdge& ListEdge,
84                                        const Standard_Boolean )
85 {
86   if (ACGroup.ptrGroup)
87   {
88     OpenGl_Mesh *amesh = new OpenGl_Mesh (ListVertex, ListEdge);
89     ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelPolygonIndices, amesh );
90   }
91 }
92
93 void OpenGl_GraphicDriver::TriangleSet(const Graphic3d_CGroup& ACGroup,
94                                       const Graphic3d_Array1OfVertexNT& ListVertex,
95                                       const Aspect_Array1OfEdge& ListEdge,
96                                       const Standard_Boolean ) 
97 {
98   if (ACGroup.ptrGroup)
99   {
100     OpenGl_Mesh *amesh = new OpenGl_Mesh (ListVertex, ListEdge);
101     ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelPolygonIndices, amesh );
102   }
103 }