summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-07-01 18:10:43 +0300
committerVadim Savchuk <vsavchuk@productengine.com>2010-07-01 18:10:43 +0300
commit207e866fd35c86161ad08c1362cd1f3cfe73ed93 (patch)
tree9e8ff877af0d293267b07d1e3cf770a1b221661d /indra/llrender
parentda217cee63019977f371492dde2692046302d9cc (diff)
parent67f0a792a286546b7213666d337b394517342394 (diff)
Merge from default branch
--HG-- branch : product-engine
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llvertexbuffer.cpp11
-rw-r--r--indra/llrender/llvertexbuffer.h2
2 files changed, 9 insertions, 4 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index ae43915a9d..8012bbb6c8 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -388,6 +388,11 @@ LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage) :
mUsage = 0;
}
+ if (mUsage == GL_STREAM_DRAW_ARB && !sUseStreamDraw)
+ {
+ mUsage = 0;
+ }
+
S32 stride = calcStride(typemask, mOffsets);
mTypeMask = typemask;
@@ -819,7 +824,7 @@ BOOL LLVertexBuffer::useVBOs() const
return FALSE;
}
#endif
- return sEnableVBOs;
+ return TRUE;
}
//----------------------------------------------------------------------------
@@ -1183,7 +1188,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
{
if (mGLBuffer)
{
- if (sEnableVBOs && sVBOActive)
+ if (sVBOActive)
{
glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
sBindCount++;
@@ -1195,7 +1200,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
setup = TRUE; // ... or a client memory pointer changed
}
}
- if (sEnableVBOs && mGLIndices && sIBOActive)
+ if (mGLIndices && sIBOActive)
{
/*if (sMapped)
{
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index e2fecdffef..ef0bdb21b4 100644
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -83,7 +83,7 @@ public:
static LLVBOPool sDynamicVBOPool;
static LLVBOPool sStreamIBOPool;
static LLVBOPool sDynamicIBOPool;
-
+
static BOOL sUseStreamDraw;
static void initClass(bool use_vbo);