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); |