31 { |
31 { |
32 QVector<GLfloat> data[g_numVBOs]; |
32 QVector<GLfloat> data[g_numVBOs]; |
33 bool isChanged; |
33 bool isChanged; |
34 }; |
34 }; |
35 |
35 |
36 GLCompiler(); |
36 GLCompiler (GLRenderer* renderer); |
37 ~GLCompiler(); |
37 ~GLCompiler(); |
38 void compileDocument (LDDocument* doc); |
38 void compileDocument (LDDocument* doc); |
39 void dropObject (LDObject* obj); |
39 void dropObject (LDObject* obj); |
40 void initialize(); |
40 void initialize(); |
41 QColor getColorForPolygon (LDPolygon& poly, LDObject* topobj, |
41 QColor getColorForPolygon (LDPolygon& poly, LDObject* topobj, |
71 QMap<LDObject*, ObjectVBOInfo> m_objectInfo; |
71 QMap<LDObject*, ObjectVBOInfo> m_objectInfo; |
72 LDObjectList m_staged; // Objects that need to be compiled |
72 LDObjectList m_staged; // Objects that need to be compiled |
73 GLuint m_vbo[g_numVBOs]; |
73 GLuint m_vbo[g_numVBOs]; |
74 bool m_vboChanged[g_numVBOs]; |
74 bool m_vboChanged[g_numVBOs]; |
75 int m_vboSizes[g_numVBOs]; |
75 int m_vboSizes[g_numVBOs]; |
|
76 GLRenderer* const m_renderer; |
76 }; |
77 }; |
77 |
78 |
78 #define checkGLError() { checkGLError_private (__FILE__, __LINE__); } |
79 #define checkGLError() { checkGLError_private (__FILE__, __LINE__); } |
79 void checkGLError_private (const char* file, int line); |
80 void checkGLError_private (const char* file, int line); |