summaryrefslogtreecommitdiffstats
path: root/tools/render-test/render-gl.cpp
diff options
context:
space:
mode:
authorTim Foley <tfoley@nvidia.com>2017-07-06 11:11:01 -0700
committerTim Foley <tfoley@nvidia.com>2017-07-06 11:18:09 -0700
commit03de737f0d18526b99b59a1810c7e290b66f4be2 (patch)
treed0e75b2524d9b7e666de0ca9fa13f3a086bf02dc /tools/render-test/render-gl.cpp
parent21a14cb4e0d578bc4f8a460016269a1199cac0da (diff)
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`.
Diffstat (limited to 'tools/render-test/render-gl.cpp')
-rw-r--r--tools/render-test/render-gl.cpp16
1 files changed, 8 insertions, 8 deletions
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