OCC22199 OpenGL memory leaks in TKOpenGl
[occt.git] / src / InterfaceGraphic / InterfaceGraphic_PrimitiveArray.hxx
CommitLineData
7fd59977 1#ifndef _InterfaceGraphic_PrimitiveArray_header_file_
2#define _InterfaceGraphic_PrimitiveArray_header_file_
3
4/*
5FILE: InterfaceGraphic_PrimitiveArray.hxx
6
7Created 16/06/2000 : ATS,SPK : G005
8
9This file contains definitios of internal structures for
10PARRAY and DARRAY primitives, used in OpenGl package for presentation
11
12*/
13
14#include <InterfaceGraphic_telem.hxx>
15#include <InterfaceGraphic_degeneration.hxx>
16
17#define MVERTICE 1
18#define MVNORMAL 2
19#define MVCOLOR 4
20#define MVTEXEL 8
21
22typedef enum {
23 TelUnknownArrayType,
24 TelPointsArrayType,
25 TelPolylinesArrayType,
26 TelSegmentsArrayType,
27 TelPolygonsArrayType,
28 TelTrianglesArrayType,
29 TelQuadranglesArrayType,
30 TelTriangleStripsArrayType,
31 TelQuadrangleStripsArrayType,
32 TelTriangleFansArrayType
33} TelPrimitivesArrayType;
34
35typedef enum
36{
37 VBOEdges,
38 VBOVertices,
39 VBOVcolours,
40 VBOVnormals,
41 VBOVtexels,
42 VBOMaxType
43} VBODataType;
44
45typedef struct {
46 TelPrimitivesArrayType type; /* Array type */
47 Tint format; /* Array datas format */
48 Tint num_vertexs; /* Number of vertexs */
49 Tint num_bounds; /* Number of bounds */
50 Tint num_edges; /* Number of edges */
51 Tint *bounds; /* Bounds array */
52 Tint *edges; /* Edges array vertex index */
53 tel_colour fcolours; /* Facet colour values */
54 tel_point vertices; /* Vertices */
55 Tint *vcolours; /* Vertex colour values */
56 tel_point vnormals; /* Vertex normals */
57 tel_texture_coord vtexels; /* Texture Coordinates */
58 Tchar *edge_vis; /* Edge visibility flag*/
59 Tchar *keys; /* Vertex keys*/
60 Tuint bufferVBO[VBOMaxType]; /* VBO IDs for *edges, vertices, vcolours, vnormals, vtexels.
61 default = -1. VBO - Vertex Buffer Object */
62 Tint flagBufferVBO; /* this flag is responded for bufferVBO load status.
63 -1 - Not Initial BufferVBO. Default mean.
64 0 - Error by allocated memory in Graphic Device.
65 Not Initial BufferVBO.
66 1 - Initial BufferVBO */
67 Tint VBOEnabled; /* -1 - it is not known VBO status
68 0 - draw object without VBO
69 1 - draw object with VBO */
161c4476 70 Standard_Address contextId; /* remember context for VBO */
7fd59977 71} CALL_DEF_PARRAY;
72
73#endif /* _InterfaceGraphic_PrimitiveArray_header_file_ */