diff options
| author | Anchor Linden <anchor@lindenlab.com> | 2018-02-28 22:42:23 -0800 |
|---|---|---|
| committer | Anchor Linden <anchor@lindenlab.com> | 2018-02-28 22:42:23 -0800 |
| commit | 618179a71722e47115a6b021a1eb2be99e46322f (patch) | |
| tree | 7cb94aef6fe27ed0497790f07f8c190cf1944f92 /indra/llrender/llvertexbuffer.cpp | |
| parent | bfbcd6d16931819c43eea8e83963c9f86c6892dd (diff) | |
| parent | 5a12a88f7b53bb99a6b302c35d891a8ecee59855 (diff) | |
Merge
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
| -rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 0b4427a31a..5048799854 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -1471,13 +1471,22 @@ void LLVertexBuffer::setupVertexArray() //glVertexattribIPointer requires GLSL 1.30 or later if (gGLManager.mGLSLVersionMajor > 1 || gGLManager.mGLSLVersionMinor >= 30) { - glVertexAttribIPointer(i, attrib_size[i], attrib_type[i], sTypeSize[i], (void*) mOffsets[i]); + glVertexAttribIPointer(i, attrib_size[i], attrib_type[i], sTypeSize[i], (const GLvoid*) mOffsets[i]); } #endif } else { - glVertexAttribPointerARB(i, attrib_size[i], attrib_type[i], attrib_normalized[i], sTypeSize[i], (void*) mOffsets[i]); + // nat 2016-12-16: With 64-bit clang compile, the compiler + // 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. 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*>(mOffsets[i])); } } else |
