38 GLCompiler(); |
38 GLCompiler(); |
39 ~GLCompiler(); |
39 ~GLCompiler(); |
40 void compileDocument (LDDocument* doc); |
40 void compileDocument (LDDocument* doc); |
41 void dropObject (LDObject* obj); |
41 void dropObject (LDObject* obj); |
42 void initialize(); |
42 void initialize(); |
43 QColor getColorForPolygon (LDPolygon& poly, LDObject* topobj) const; |
43 QColor getColorForPolygon (LDPolygon& poly, LDObject* topobj, |
|
44 EVBOComplement complement) const; |
44 QColor indexColorForID (int id) const; |
45 QColor indexColorForID (int id) const; |
45 void needMerge(); |
46 void needMerge(); |
46 void prepareVBO (int vbonum); |
47 void prepareVBO (int vbonum); |
47 void stageForCompilation (LDObject* obj); |
48 void stageForCompilation (LDObject* obj); |
48 void unstage (LDObject* obj); |
49 void unstage (LDObject* obj); |
65 } |
66 } |
66 |
67 |
67 private: |
68 private: |
68 void compileStaged(); |
69 void compileStaged(); |
69 void compileObject (LDObject* obj); |
70 void compileObject (LDObject* obj); |
70 void compileSubObject (LDObject* obj, LDObject* topobj, GLCompiler::ObjectVBOInfo* objinfo); |
|
71 void writeColor (QVector<float>& array, const QColor& color); |
|
72 void compilePolygon (LDPolygon& poly, LDObject* topobj, GLCompiler::ObjectVBOInfo* objinfo); |
71 void compilePolygon (LDPolygon& poly, LDObject* topobj, GLCompiler::ObjectVBOInfo* objinfo); |
73 |
72 |
74 QMap<LDObject*, ObjectVBOInfo> m_objectInfo; |
73 QMap<LDObject*, ObjectVBOInfo> m_objectInfo; |
75 LDObjectList m_staged; // Objects that need to be compiled |
74 LDObjectList m_staged; // Objects that need to be compiled |
76 GLuint m_vbo[g_numVBOs]; |
75 GLuint m_vbo[g_numVBOs]; |