summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2016-12-17 11:07:20 -0500
committerNat Goodspeed <nat@lindenlab.com>2016-12-17 11:07:20 -0500
commit129896106638884ff41bdcd8441a5bcc221aa580 (patch)
tree627edad0538429ce18e289995ee904fce1706fff
parent050294a23cffe41ca59581d4b73c881d484c8f5a (diff)
DRTVWR-418: Update dubious llvertexbuffer.cpp cast comment.
Ruslan assures me that in fact this usage is valid.
-rw-r--r--indra/llrender/llvertexbuffer.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index b6fae1ad26..8ec78f605b 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -1451,14 +1451,12 @@ void LLVertexBuffer::setupVertexArray()
// produces an error if we simply cast mOffsets[i] -- an S32
// -- to (GLvoid *), the type of the parameter. It correctly
// points out that there's no way an S32 could fit a real
- // pointer value. Since I do not know what we're trying to
- // achieve here, I'm going to grit my teeth and try to
- // persuade the compiler we know what we're doing, until
- // someone who actually does know fixes it better.
- uintptr_t fake_offset(mOffsets[i]);
+ // pointer value. Ruslan asserts that in this case the last
+ // param is interpreted as an array data offset within the VBO
+ // rather than as an actual pointer, so it's okay.
glVertexAttribPointerARB(i, attrib_size[i], attrib_type[i],
attrib_normalized[i], sTypeSize[i],
- reinterpret_cast<GLvoid*>(fake_offset));
+ reinterpret_cast<GLvoid*>(mOffsets[i]));
}
}
else