# HG changeset patch # User Teemu Piippo # Date 1581033736 -7200 # Node ID 0f80a2e5e42b8d5e859ae759fa6be03fe3d65260 # Parent d56cc7387dad6ab5008f85d7b01d1ceed4ec213f fix some warnings diff -r d56cc7387dad -r 0f80a2e5e42b src/gl/compiler.cpp --- 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(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); } diff -r d56cc7387dad -r 0f80a2e5e42b src/gl/compiler.h --- a/src/gl/compiler.h Fri Feb 07 02:01:21 2020 +0200 +++ b/src/gl/compiler.h Fri Feb 07 02:02:16 2020 +0200 @@ -55,7 +55,7 @@ std::size_t vertexCount(gl::ArrayClass arrayClass) const; QColor getColorForPolygon(const gl::Polygon& polygon, const RenderPreferences& preferences); glm::vec3 modelCenter() const; - double modelDistance() const; + float modelDistance() const; void initialize(); void bindVertexArray(gl::ArrayClass arrayClass); void releaseVertexArray(gl::ArrayClass arrayClass);