summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-01-13 13:38:24 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2010-01-13 13:38:24 +0200
commite6c2b2b87cd8b90116a3eb7bfb01b3efce6d6ba2 (patch)
tree89d21fc719352fd6ebd5987ae77e63f208d0542e /indra/llrender
parenta619f9c307a46d709061c6e1d8179e699964688d (diff)
parentabc190525fd047b22f2e50b22a9fcd4d05f45e83 (diff)
Merge from default branch.
--HG-- branch : product-engine
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llvertexbuffer.cpp42
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;
+ }
}
}
}