src/glcompiler.h

changeset 1440
265b2e95a8e8
parent 1436
241d3e452b32
equal deleted inserted replaced
1436:241d3e452b32 1440:265b2e95a8e8
64 QVector<GLfloat> data[NumVbos]; 64 QVector<GLfloat> data[NumVbos];
65 }; 65 };
66 66
67 void compileStaged(); 67 void compileStaged();
68 void compilePolygon(LDPolygon& poly, const QModelIndex& polygonOwnerIndex, ObjectVboData& objectInfo); 68 void compilePolygon(LDPolygon& poly, const QModelIndex& polygonOwnerIndex, ObjectVboData& objectInfo);
69 Q_SLOT void compileObject(const QModelIndex &index); 69 Q_SLOT void compileObject(const Uuid& index);
70 QColor getColorForPolygon(const LDPolygon& polygon, const QModelIndex& polygonOwnerIndex, VboSubclass complement); 70 QColor getColorForPolygon(const LDPolygon& polygon, const QModelIndex& polygonOwnerIndex, VboSubclass complement);
71 QColor indexColorForID (qint32 id) const; 71 QColor indexColorForID (qint32 id) const;
72 void needMerge(); 72 void needMerge();
73 Q_SLOT void recompile(); 73 Q_SLOT void recompile();
74 void dropObjectInfo (const QModelIndex &index); 74 void dropObjectInfo (const Uuid& index);
75 Q_SLOT void forgetObject(QModelIndex index); 75 Q_SLOT void forgetObject(const Uuid& index);
76 void stageForCompilation(const QModelIndex &index); 76 void stageForCompilation(const Uuid& index);
77 void unstage (const QModelIndex &index); 77 void unstage (const Uuid& index);
78 78
79 QMap<QPersistentModelIndex, ObjectVboData> m_objectInfo; 79 QMap<Uuid, ObjectVboData> m_objectInfo;
80 QSet<QPersistentModelIndex> m_staged; // Objects that need to be compiled 80 QSet<Uuid> m_staged; // Objects that need to be compiled
81 GLuint m_vbo[NumVbos]; 81 GLuint m_vbo[NumVbos];
82 bool m_vboChanged[NumVbos] = {true}; 82 bool m_vboChanged[NumVbos] = {true};
83 bool needBoundingBoxRebuild = true; 83 bool needBoundingBoxRebuild = true;
84 int m_vboSizes[NumVbos] = {0}; 84 int m_vboSizes[NumVbos] = {0};
85 gl::Renderer* m_renderer; 85 gl::Renderer* m_renderer;
90 void handleRowInsertion(const QModelIndex&, int first, int last); 90 void handleRowInsertion(const QModelIndex&, int first, int last);
91 void handleRowRemoval(const QModelIndex&, int first, int last); 91 void handleRowRemoval(const QModelIndex&, int first, int last);
92 void handleDataChange(const QModelIndex& topLeft, const QModelIndex &bottomRight); 92 void handleDataChange(const QModelIndex& topLeft, const QModelIndex &bottomRight);
93 void handleObjectHighlightingChanged(const QModelIndex& oldIndex, const QModelIndex& newIndex); 93 void handleObjectHighlightingChanged(const QModelIndex& oldIndex, const QModelIndex& newIndex);
94 void clearSelectionModel(); 94 void clearSelectionModel();
95 void objectRemoved(const Uuid &id);
95 }; 96 };
96 97
97 #define CHECK_GL_ERROR() { checkGLError(__FILE__, __LINE__); } 98 #define CHECK_GL_ERROR() { checkGLError(__FILE__, __LINE__); }
98 void checkGLError (QString file, int line); 99 void checkGLError (QString file, int line);

mercurial