diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-11-11 09:37:45 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-11-11 09:37:45 -0500 |
commit | 5fb30e5ad3615c0b0e9e67a94542dbb110e9ed95 (patch) | |
tree | 50e0341f2beec61836ffb79a31c05d24f761248a /indra/llrender/llglslshader.cpp | |
parent | a6d9323c7266cf496bc1db6df8ce5bcb58f84ede (diff) |
MAINT-6913 - (Via Sovereign Engineer and Shyotl Kuhr) Pack the skinned matrix and translation into a single mat3x4 for optimal data transfer to reduce uniform slot usage.
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 58c1186a3e..5d669fb955 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -1257,6 +1257,23 @@ void LLGLSLShader::uniformMatrix3fv(U32 index, U32 count, GLboolean transpose, c } } +void LLGLSLShader::uniformMatrix3x4fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v) +{ + if (mProgramObject > 0) + { + if (mUniform.size() <= index) + { + UNIFORM_ERRS << "Uniform index out of bounds." << LL_ENDL; + return; + } + + if (mUniform[index] >= 0) + { + glUniformMatrix3x4fv(mUniform[index], count, transpose, v); + } + } +} + void LLGLSLShader::uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v) { if (mProgramObject > 0) |