summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2016-12-20 11:14:51 -0500
committerOz Linden <oz@lindenlab.com>2016-12-20 11:14:51 -0500
commit498ffa1acee1b59e8e2e1e57a3e1640f7b368168 (patch)
tree122e1cb7a553904bf9a36558c26010507738a878 /indra/llrender
parent17ca7fc38d7abebd009396d6a2ad22edc3ed7836 (diff)
parentfd79bb9c7dbd0180f6dd3711450083ea2020e93f (diff)
merge changes from project trunk
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llvertexbuffer.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 0fae600a90..c09d614c3c 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -1436,13 +1436,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