From 129896106638884ff41bdcd8441a5bcc221aa580 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 17 Dec 2016 11:07:20 -0500 Subject: DRTVWR-418: Update dubious llvertexbuffer.cpp cast comment. Ruslan assures me that in fact this usage is valid. --- indra/llrender/llvertexbuffer.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'indra') 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(fake_offset)); + reinterpret_cast(mOffsets[i])); } } else -- cgit v1.2.3