summaryrefslogtreecommitdiff
path: root/indra/llrender/llvertexbuffer.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-06-06 22:43:38 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-06-06 22:43:38 +0000
commitad332810078a0bbb8fa08fcbfdf3d756de6914f6 (patch)
tree1608b2db5d620d323673607ea7ddadfba9d58bda /indra/llrender/llvertexbuffer.cpp
parenta7d9a543e587ffe84b355db7a2e8193bfe6c68b6 (diff)
QAR-650 - Viewer RC 9 merge -> release (post cmake)
merge release@88802 Branch_1-20-Viewer-2-merge-1@89178 -> release
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r--indra/llrender/llvertexbuffer.cpp33
1 files changed, 32 insertions, 1 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 2f053a6493..d79a0d6034 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -38,7 +38,7 @@
#include "llglheaders.h"
#include "llmemory.h"
#include "llmemtype.h"
-#include "llglimmediate.h"
+#include "llrender.h"
//============================================================================
@@ -768,11 +768,26 @@ U8* LLVertexBuffer::mapBuffer(S32 access)
sMapped = TRUE;*/
if (!mMappedData)
{
+ GLint buff;
+ glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff);
+ if (buff != mGLBuffer)
+ {
+ llerrs << "Invalid GL vertex buffer bound: " << buff << llendl;
+ }
+
+
llerrs << "glMapBuffer returned NULL (no vertex data)" << llendl;
}
if (!mMappedIndexData)
{
+ GLint buff;
+ glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff);
+ if (buff != mGLIndices)
+ {
+ llerrs << "Invalid GL index buffer bound: " << buff << llendl;
+ }
+
llerrs << "glMapBuffer returned NULL (no index data)" << llendl;
}
@@ -952,6 +967,22 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
sIBOActive = TRUE;
}
+ if (gDebugGL)
+ {
+ GLint buff;
+ glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff);
+ if (buff != mGLBuffer)
+ {
+ llerrs << "Invalid GL vertex buffer bound: " << buff << llendl;
+ }
+
+ glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff);
+ if (buff != mGLIndices)
+ {
+ llerrs << "Invalid GL index buffer bound: " << buff << llendl;
+ }
+ }
+
if (mResized)
{
if (gDebugGL)