src/GLCompiler.h

changeset 698
16e6d7d87982
parent 694
3868f52da6b9
child 701
25b7b4aa9916
equal deleted inserted replaced
697:2766f7b037ad 698:16e6d7d87982
29 class GLCompiler 29 class GLCompiler
30 { 30 {
31 public: 31 public:
32 struct ObjectVBOInfo 32 struct ObjectVBOInfo
33 { 33 {
34 QVector<GLfloat> data[gNumVBOs]; 34 QVector<GLfloat> data[g_numVBOs];
35 }; 35 };
36 36
37 GLCompiler(); 37 GLCompiler();
38 ~GLCompiler(); 38 ~GLCompiler();
39 void compileDocument (LDDocument* doc); 39 void compileDocument (LDDocument* doc);
57 return mVBOs[vbonum]; 57 return mVBOs[vbonum];
58 } 58 }
59 59
60 inline int getVBOCount (int vbonum) const 60 inline int getVBOCount (int vbonum) const
61 { 61 {
62 return mVBOSizes[vbonum] / 3; 62 return m_VBOSizes[vbonum] / 3;
63 } 63 }
64 64
65 private: 65 private:
66 void compileStaged(); 66 void compileStaged();
67 void compileObject (LDObject* obj); 67 void compileObject (LDObject* obj);
69 void writeColor (QVector<float>& array, const QColor& color); 69 void writeColor (QVector<float>& array, const QColor& color);
70 void compilePolygon (LDPolygon& poly, LDObject* topobj, GLCompiler::ObjectVBOInfo* objinfo); 70 void compilePolygon (LDPolygon& poly, LDObject* topobj, GLCompiler::ObjectVBOInfo* objinfo);
71 71
72 QMap<LDObject*, ObjectVBOInfo> mObjectInfo; 72 QMap<LDObject*, ObjectVBOInfo> mObjectInfo;
73 LDObjectList mStaged; // Objects that need to be compiled 73 LDObjectList mStaged; // Objects that need to be compiled
74 GLuint mVBOs[gNumVBOs]; 74 GLuint mVBOs[g_numVBOs];
75 bool mChanged[gNumVBOs]; 75 bool m_vboChanged[g_numVBOs];
76 int mVBOSizes[gNumVBOs]; 76 int m_VBOSizes[g_numVBOs];
77 }; 77 };
78 78
79 #define checkGLError() { checkGLError_private (__FILE__, __LINE__); } 79 #define checkGLError() { checkGLError_private (__FILE__, __LINE__); }
80 void checkGLError_private (const char* file, int line); 80 void checkGLError_private (const char* file, int line);
81 81

mercurial