From 5176d51714730e94486a7604d7357e57f345e284 Mon Sep 17 00:00:00 2001 From: samcake Date: Wed, 23 Sep 2015 16:05:53 -0700 Subject: [PATCH] Merge and fix warnings --- libraries/gpu/src/gpu/GLBackendInput.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libraries/gpu/src/gpu/GLBackendInput.cpp b/libraries/gpu/src/gpu/GLBackendInput.cpp index 4877b57128..0176d9ba0c 100755 --- a/libraries/gpu/src/gpu/GLBackendInput.cpp +++ b/libraries/gpu/src/gpu/GLBackendInput.cpp @@ -114,11 +114,11 @@ void GLBackend::updateInput() { GLenum perLocationSize = attrib._element.getLocationSize(); - for (int j = 0; j < locationCount; ++j) { - newActivation.set(slot + j); - glVertexAttribFormat(slot + j, count, type, isNormalized, offset + j * perLocationSize); - glVertexAttribDivisor(slot + j, attrib._frequency); - glVertexAttribBinding(slot + j, attrib._channel); + for (size_t locNum = 0; locNum < locationCount; ++locNum) { + newActivation.set(slot + locNum); + glVertexAttribFormat(slot + locNum, count, type, isNormalized, offset + locNum * perLocationSize); + glVertexAttribDivisor(slot + locNum, attrib._frequency); + glVertexAttribBinding(slot + locNum, attrib._channel); } } (void) CHECK_GL_ERROR(); @@ -235,10 +235,10 @@ void GLBackend::updateInput() { GLuint pointer = attrib._offset + offsets[bufferNum]; GLboolean isNormalized = attrib._element.isNormalized(); - for (int j = 0; j < locationCount; ++j) { - glVertexAttribPointer(slot + j, count, type, isNormalized, stride, - reinterpret_cast(pointer + perLocationStride * j)); - glVertexAttribDivisor(slot + j, attrib._frequency); + for (size_t locNum = 0; locNum < locationCount; ++locNum) { + glVertexAttribPointer(slot + locNum, count, type, isNormalized, stride, + reinterpret_cast(pointer + perLocationStride * locNum)); + glVertexAttribDivisor(slot + locNum, attrib._frequency); } // TODO: Support properly the IAttrib version