Replaced uses of currentDocument() in GLRenderer with m_model

Thu, 09 Feb 2017 23:51:42 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Thu, 09 Feb 2017 23:51:42 +0200
changeset 1121
be0b5ad128ea
parent 1120
c3f07620494e
child 1122
795d1c3554b9

Replaced uses of currentDocument() in GLRenderer with m_model

src/glCompiler.cpp file | annotate | diff | comparison | revisions
src/glCompiler.h file | annotate | diff | comparison | revisions
src/glRenderer.cpp file | annotate | diff | comparison | revisions
--- 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();
--- 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);
--- 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);

mercurial