diff options
author | Roxie Linden <roxie@lindenlab.com> | 2010-02-24 17:04:48 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2010-02-24 17:04:48 -0800 |
commit | 6bb43e1369d957a041c796120e87a89ff3fa10ee (patch) | |
tree | 678e25f3b62ab90e2940dfcae5feafa1acaa8ffc /indra/llrender/llvertexbuffer.cpp | |
parent | ff52ac089f9ed67410f80fe66d0b997f0f2dafcc (diff) | |
parent | fc633fce71c6bdd43ab009558c7556f528335fe0 (diff) |
Automated merge up from viewer 2.0 trunk.
Some llvoiceclient changes duplicated changes that had already been
made in the voice modularization refactor, so the refactor versions
were used.
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index db4189dfea..572ae13909 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -1061,17 +1061,20 @@ void LLVertexBuffer::setBuffer(U32 data_mask) } } - glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); - if ((GLuint)buff != mGLIndices) + if (mGLIndices) { - if (gDebugSession) - { - error = TRUE; - gFailLog << "Invalid GL index buffer bound: " << buff << std::endl; - } - else + glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); + if ((GLuint)buff != mGLIndices) { - llerrs << "Invalid GL index buffer bound: " << buff << llendl; + if (gDebugSession) + { + error = TRUE; + gFailLog << "Invalid GL index buffer bound: " << buff << std::endl; + } + else + { + llerrs << "Invalid GL index buffer bound: " << buff << llendl; + } } } } @@ -1095,17 +1098,20 @@ void LLVertexBuffer::setBuffer(U32 data_mask) } } - glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); - if ((GLuint)buff != mGLIndices) + if (mGLIndices != 0) { - if (gDebugSession) - { - error = TRUE; - gFailLog << "Invalid GL index buffer bound: "<< std::endl; - } - else + glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); + if ((GLuint)buff != mGLIndices) { - llerrs << "Invalid GL index buffer bound: " << buff << llendl; + if (gDebugSession) + { + error = TRUE; + gFailLog << "Invalid GL index buffer bound: "<< std::endl; + } + else + { + llerrs << "Invalid GL index buffer bound: " << buff << llendl; + } } } } |