src/glCompiler.cpp

changeset 1098
0b837bed121d
parent 1086
621c2e5853bb
child 1113
5f3139c802bf
equal deleted inserted replaced
1097:9a9e6ce0c5dc 1098:0b837bed121d
214 { 214 {
215 m_staged.remove (obj); 215 m_staged.remove (obj);
216 } 216 }
217 217
218 218
219 void GLCompiler::compileDocument (LDDocument* doc) 219 void GLCompiler::compileModel (Model* model)
220 { 220 {
221 if (doc) 221 if (model)
222 { 222 {
223 for (LDObject* obj : doc->objects()) 223 for (LDObject* obj : model->objects())
224 compileObject (obj); 224 compileObject (obj);
225 } 225 }
226 } 226 }
227 227
228 228
233 233
234 m_staged.clear(); 234 m_staged.clear();
235 } 235 }
236 236
237 237
238 void GLCompiler::prepareVBO (int vbonum) 238 void GLCompiler::prepareVBO (int vbonum, Model* model)
239 { 239 {
240 // Compile anything that still awaits it 240 // Compile anything that still awaits it
241 compileStaged(); 241 compileStaged();
242 242
243 if (not m_vboChanged[vbonum]) 243 if (not m_vboChanged[vbonum])
251 { 251 {
252 it = m_objectInfo.erase (it); 252 it = m_objectInfo.erase (it);
253 continue; 253 continue;
254 } 254 }
255 255
256 if (it.key()->model() == currentDocument() and not it.key()->isHidden()) 256 if (it.key()->model() == model and not it.key()->isHidden())
257 vbodata += it->data[vbonum]; 257 vbodata += it->data[vbonum];
258 258
259 ++it; 259 ++it;
260 } 260 }
261 261

mercurial