34 }; |
35 }; |
35 |
36 |
36 GLCompiler (GLRenderer* renderer); |
37 GLCompiler (GLRenderer* renderer); |
37 ~GLCompiler(); |
38 ~GLCompiler(); |
38 void compileDocument (LDDocument* doc); |
39 void compileDocument (LDDocument* doc); |
39 void dropObject (LDObject* obj); |
40 void dropObjectInfo (LDObject* obj); |
40 void initialize(); |
41 void initialize(); |
41 QColor getColorForPolygon (LDPolygon& poly, LDObject* topobj, |
42 QColor getColorForPolygon (LDPolygon& poly, LDObject* topobj, |
42 EVBOComplement complement) const; |
43 EVBOComplement complement) const; |
43 QColor indexColorForID (int id) const; |
44 QColor indexColorForID (int id) const; |
44 void needMerge(); |
45 void needMerge(); |
68 void compileStaged(); |
69 void compileStaged(); |
69 void compileObject (LDObject* obj); |
70 void compileObject (LDObject* obj); |
70 void compilePolygon (LDPolygon& poly, LDObject* topobj, ObjectVBOInfo* objinfo); |
71 void compilePolygon (LDPolygon& poly, LDObject* topobj, ObjectVBOInfo* objinfo); |
71 |
72 |
72 QMap<LDObject*, ObjectVBOInfo> m_objectInfo; |
73 QMap<LDObject*, ObjectVBOInfo> m_objectInfo; |
73 LDObjectList m_staged; // Objects that need to be compiled |
74 QSet<LDObject*> m_staged; // Objects that need to be compiled |
74 GLuint m_vbo[g_numVBOs]; |
75 GLuint m_vbo[g_numVBOs]; |
75 bool m_vboChanged[g_numVBOs]; |
76 bool m_vboChanged[g_numVBOs]; |
76 int m_vboSizes[g_numVBOs]; |
77 int m_vboSizes[g_numVBOs]; |
77 GLRenderer* m_renderer; |
78 GLRenderer* m_renderer; |
78 }; |
79 }; |
79 |
80 |
80 #define CHECK_GL_ERROR() { CheckGLErrorImpl (__FILE__, __LINE__); } |
81 #define CHECK_GL_ERROR() { CheckGLErrorImpl (__FILE__, __LINE__); } |
81 void CheckGLErrorImpl (const char* file, int line); |
82 void CheckGLErrorImpl (const char* file, int line); |