diff options
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 0dcf563491..da4658dc03 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -243,6 +243,13 @@ void LLGLSLShader::attachObjects(GLhandleARB* objects, S32 count) BOOL LLGLSLShader::mapAttributes(const vector<string> * attributes) { + //before linking, make sure reserved attributes always have consistent locations + for (U32 i = 0; i < LLShaderMgr::instance()->mReservedAttribs.size(); i++) + { + const char* name = LLShaderMgr::instance()->mReservedAttribs[i].c_str(); + glBindAttribLocationARB(mProgramObject, i, (const GLcharARB *) name); + } + //link the program BOOL res = link(); |