src/glShared.h

changeset 986
525921eae58c
parent 968
4b93b7963456
child 1014
f0a8ecb6a357
child 1217
314e12e23c3a
equal deleted inserted replaced
985:ed7b31b9f904 986:525921eae58c
37 { 37 {
38 return (num == 5) ? 4 : num; 38 return (num == 5) ? 4 : num;
39 } 39 }
40 }; 40 };
41 41
42 enum EVBOSurface 42 enum SurfaceVboType
43 { 43 {
44 VBOSF_Lines, 44 LinesVbo,
45 VBOSF_Triangles, 45 TrianglesVbo,
46 VBOSF_Quads, 46 QuadsVbo,
47 VBOSF_CondLines, 47 ConditionalLinesVbo,
48 48
49 VBOSF_NumSurfaces, 49 NumSurfaceVbos,
50 VBOSF_First = VBOSF_Lines 50 FirstSurfaceVbo = LinesVbo
51 }; 51 };
52 52
53 enum EVBOComplement 53 enum ComplementVboType
54 { 54 {
55 VBOCM_Surfaces, 55 SurfacesVboComplement,
56 VBOCM_NormalColors, 56 NormalColorsVboComplement,
57 VBOCM_PickColors, 57 PickColorsVboComplement,
58 VBOCM_BFCFrontColors, 58 BfcFrontColorsVboComplement,
59 VBOCM_BFCBackColors, 59 BfcBackColorsVboComplement,
60 VBOCM_RandomColors, 60 RandomColorsVboComplement,
61 61
62 VBOCM_NumComplements, 62 NumVboComplements,
63 VBOCM_First = VBOCM_Surfaces 63 FirstVboComplement = SurfacesVboComplement
64 }; 64 };
65 65
66 MAKE_ITERABLE_ENUM (EVBOSurface) 66 enum
67 MAKE_ITERABLE_ENUM (EVBOComplement) 67 {
68 NumVbos = NumSurfaceVbos * NumVboComplements
69 };
70
71 MAKE_ITERABLE_ENUM (SurfaceVboType)
72 MAKE_ITERABLE_ENUM (ComplementVboType)
68 73
69 #ifndef USE_QT5 74 #ifndef USE_QT5
70 // Placeholder QOpenGLFunctions for Qt 4.x support 75 // Placeholder QOpenGLFunctions for Qt 4.x support
71 struct QOpenGLFunctions 76 struct QOpenGLFunctions
72 { 77 {
85 void glGenBuffers (GLuint, GLuint*); 90 void glGenBuffers (GLuint, GLuint*);
86 void glDeleteBuffers (GLuint, GLuint*); 91 void glDeleteBuffers (GLuint, GLuint*);
87 void glBufferData (GLuint, GLuint, void*, GLuint); 92 void glBufferData (GLuint, GLuint, void*, GLuint);
88 void glBufferSubData (GLenum, GLint, GLsizei, void*); 93 void glBufferSubData (GLenum, GLint, GLsizei, void*);
89 #endif 94 #endif
90
91 static const int g_numVBOs = VBOSF_NumSurfaces * VBOCM_NumComplements;

mercurial