src/glCompiler.cc

changeset 883
69b8adc9a669
parent 861
83426c5fa732
child 885
9c4fc9b433ae
child 886
3c83fe3486b1
equal deleted inserted replaced
882:2f3cc8e045d5 883:69b8adc9a669
278 if (not m_vboChanged[vbonum]) 278 if (not m_vboChanged[vbonum])
279 return; 279 return;
280 280
281 QVector<GLfloat> vbodata; 281 QVector<GLfloat> vbodata;
282 282
283 for (auto it = m_objectInfo.begin(); it != m_objectInfo.end(); ++it) 283 for (auto it = m_objectInfo.begin(); it != m_objectInfo.end();)
284 { 284 {
285 if (it.key() == null) 285 if (it.key() == null)
286 {
286 it = m_objectInfo.erase (it); 287 it = m_objectInfo.erase (it);
287 elif (it.key().toStrongRef()->document() == CurrentDocument() and not it.key().toStrongRef()->isHidden()) 288 }
289 elif (it.key().toStrongRef()->document() == CurrentDocument()
290 and not it.key().toStrongRef()->isHidden())
291 {
288 vbodata += it->data[vbonum]; 292 vbodata += it->data[vbonum];
293 ++it;
294 }
289 } 295 }
290 296
291 glBindBuffer (GL_ARRAY_BUFFER, m_vbo[vbonum]); 297 glBindBuffer (GL_ARRAY_BUFFER, m_vbo[vbonum]);
292 glBufferData (GL_ARRAY_BUFFER, vbodata.size() * sizeof(GLfloat), vbodata.constData(), GL_STATIC_DRAW); 298 glBufferData (GL_ARRAY_BUFFER, vbodata.size() * sizeof(GLfloat), vbodata.constData(), GL_STATIC_DRAW);
293 glBindBuffer (GL_ARRAY_BUFFER, 0); 299 glBindBuffer (GL_ARRAY_BUFFER, 0);

mercurial