src/gl/compiler.cpp

changeset 50
0f80a2e5e42b
parent 49
d56cc7387dad
child 51
1a9eac27698d
--- a/src/gl/compiler.cpp	Fri Feb 07 02:01:21 2020 +0200
+++ b/src/gl/compiler.cpp	Fri Feb 07 02:02:16 2020 +0200
@@ -166,7 +166,7 @@
 			object.program->setAttributeBuffer(0, GL_FLOAT, offsetof(gl::Vertex, position), 3, stride);
 			object.program->setAttributeBuffer(1, GL_FLOAT, offsetof(gl::Vertex, color), 4, stride);
 			object.program->setAttributeBuffer(2, GL_FLOAT, offsetof(gl::Vertex, normal), 3, stride);
-			glVertexAttribIPointer(3, 1, GL_INT, stride, (void*)offsetof(gl::Vertex, id));
+			glVertexAttribIPointer(3, 1, GL_INT, stride, reinterpret_cast<void*>(offsetof(gl::Vertex, id)));
 			object.vertexArray.release();
 			object.buffer.release();
 			object.program->release();
@@ -266,7 +266,7 @@
 	return boxCenter(this->boundingBox);
 }
 
-double gl::Compiler::modelDistance() const
+float gl::Compiler::modelDistance() const
 {
 	return longestMeasure(this->boundingBox);
 }

mercurial