diff options
| -rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 10 | 
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 | 
