mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 04:06:41 +02:00
Merge and fix warnings
This commit is contained in:
parent
370b41895c
commit
5176d51714
1 changed files with 9 additions and 9 deletions
|
@ -114,11 +114,11 @@ void GLBackend::updateInput() {
|
||||||
|
|
||||||
GLenum perLocationSize = attrib._element.getLocationSize();
|
GLenum perLocationSize = attrib._element.getLocationSize();
|
||||||
|
|
||||||
for (int j = 0; j < locationCount; ++j) {
|
for (size_t locNum = 0; locNum < locationCount; ++locNum) {
|
||||||
newActivation.set(slot + j);
|
newActivation.set(slot + locNum);
|
||||||
glVertexAttribFormat(slot + j, count, type, isNormalized, offset + j * perLocationSize);
|
glVertexAttribFormat(slot + locNum, count, type, isNormalized, offset + locNum * perLocationSize);
|
||||||
glVertexAttribDivisor(slot + j, attrib._frequency);
|
glVertexAttribDivisor(slot + locNum, attrib._frequency);
|
||||||
glVertexAttribBinding(slot + j, attrib._channel);
|
glVertexAttribBinding(slot + locNum, attrib._channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(void) CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
|
@ -235,10 +235,10 @@ void GLBackend::updateInput() {
|
||||||
GLuint pointer = attrib._offset + offsets[bufferNum];
|
GLuint pointer = attrib._offset + offsets[bufferNum];
|
||||||
GLboolean isNormalized = attrib._element.isNormalized();
|
GLboolean isNormalized = attrib._element.isNormalized();
|
||||||
|
|
||||||
for (int j = 0; j < locationCount; ++j) {
|
for (size_t locNum = 0; locNum < locationCount; ++locNum) {
|
||||||
glVertexAttribPointer(slot + j, count, type, isNormalized, stride,
|
glVertexAttribPointer(slot + locNum, count, type, isNormalized, stride,
|
||||||
reinterpret_cast<GLvoid*>(pointer + perLocationStride * j));
|
reinterpret_cast<GLvoid*>(pointer + perLocationStride * locNum));
|
||||||
glVertexAttribDivisor(slot + j, attrib._frequency);
|
glVertexAttribDivisor(slot + locNum, attrib._frequency);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Support properly the IAttrib version
|
// TODO: Support properly the IAttrib version
|
||||||
|
|
Loading…
Reference in a new issue