From 03de737f0d18526b99b59a1810c7e290b66f4be2 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Thu, 6 Jul 2017 11:11:01 -0700 Subject: Fix many warnings-as-errors issues. The code should now compile cleanly with warnings as errors for VS2015 with `W3`. Most of the changes had to do with propagating a real pointer-sized integer type through code that had been using `int`. --- tools/render-test/render-gl.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tools/render-test/render-gl.cpp') diff --git a/tools/render-test/render-gl.cpp b/tools/render-test/render-gl.cpp index d6166fc3c..f02ac36c4 100644 --- a/tools/render-test/render-gl.cpp +++ b/tools/render-test/render-gl.cpp @@ -297,7 +297,7 @@ public: glAttr.streamIndex = 0; glAttr.format = getVertexAttributeFormat(inputAttr.format); - glAttr.offset = inputAttr.offset; + glAttr.offset = (GLsizei) inputAttr.offset; } return (InputLayout*)inputLayout; @@ -388,7 +388,7 @@ public: assert(!offsets || !offsets[ii]); - glBindBufferBase(GL_UNIFORM_BUFFER, slot, bufferID); + glBindBufferBase(GL_UNIFORM_BUFFER, (GLuint) slot, bufferID); } } @@ -405,18 +405,18 @@ public: glBindBuffer(GL_ARRAY_BUFFER, boundVertexStreamBuffers[streamIndex]); glVertexAttribPointer( - ii, - attr.format.componentCount, + (GLuint) ii, + attr.format.componentCount, attr.format.componentType, attr.format.normalized, - boundVertexStreamStrides[streamIndex], + (GLsizei) boundVertexStreamStrides[streamIndex], (GLvoid*)(attr.offset + boundVertexStreamOffsets[streamIndex])); - glEnableVertexAttribArray(ii); + glEnableVertexAttribArray((GLuint)ii); } for (UInt ii = attrCount; ii < kMaxVertexStreams; ++ii) { - glDisableVertexAttribArray(ii); + glDisableVertexAttribArray((GLuint)ii); } } @@ -424,7 +424,7 @@ public: { flushStateForDraw(); - glDrawArrays(boundPrimitiveTopology, startVertex, vertexCount); + glDrawArrays(boundPrimitiveTopology, (GLint) startVertex, (GLsizei) vertexCount); } // ShaderCompiler interface -- cgit v1.2.3