# HG changeset patch # User Teemu Piippo # Date 1486677102 -7200 # Node ID be0b5ad128ea4b0a3feb6c6b5c7ddbf820445de5 # Parent c3f07620494e893ec7572dd0e4becdb0b007cb69 Replaced uses of currentDocument() in GLRenderer with m_model diff -r c3f07620494e -r be0b5ad128ea src/glCompiler.cpp --- a/src/glCompiler.cpp Thu Feb 09 23:50:11 2017 +0200 +++ b/src/glCompiler.cpp Thu Feb 09 23:51:42 2017 +0200 @@ -224,7 +224,7 @@ } -void GLCompiler::prepareVBO (int vbonum, Model* model) +void GLCompiler::prepareVBO (int vbonum, const Model* model) { // Compile anything that still awaits it compileStaged(); diff -r c3f07620494e -r be0b5ad128ea src/glCompiler.h --- a/src/glCompiler.h Thu Feb 09 23:50:11 2017 +0200 +++ b/src/glCompiler.h Thu Feb 09 23:51:42 2017 +0200 @@ -42,7 +42,7 @@ QColor indexColorForID (int id) const; void initialize(); void needMerge(); - void prepareVBO (int vbonum, Model* model); + void prepareVBO (int vbonum, const Model* model); void setRenderer (GLRenderer* compiler); void stageForCompilation (LDObject* obj); void unstage (LDObject* obj); diff -r c3f07620494e -r be0b5ad128ea src/glRenderer.cpp --- a/src/glRenderer.cpp Thu Feb 09 23:50:11 2017 +0200 +++ b/src/glRenderer.cpp Thu Feb 09 23:51:42 2017 +0200 @@ -492,9 +492,9 @@ int surfaceVboNumber = m_compiler->vboNumber(surface, SurfacesVboComplement); int colorVboNumber = m_compiler->vboNumber(surface, colors); int normalVboNumber = m_compiler->vboNumber(surface, NormalsVboComplement); - m_compiler->prepareVBO(surfaceVboNumber, currentDocument()); - m_compiler->prepareVBO(colorVboNumber, currentDocument()); - m_compiler->prepareVBO(normalVboNumber, currentDocument()); + m_compiler->prepareVBO(surfaceVboNumber, m_model); + m_compiler->prepareVBO(colorVboNumber, m_model); + m_compiler->prepareVBO(normalVboNumber, m_model); GLuint surfaceVbo = m_compiler->vbo(surfaceVboNumber); GLuint colorVbo = m_compiler->vbo(colorVboNumber); GLuint normalVbo = m_compiler->vbo(normalVboNumber);