diff options
| author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-06-30 15:28:18 +0300 |
|---|---|---|
| committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-06-30 15:28:18 +0300 |
| commit | f4285a2ffb8baa911fac4ae0f505128a985a750b (patch) | |
| tree | 24a9d9df0938ae3b7702b6fc1280a6b3813447ea /indra/llrender/llvertexbuffer.cpp | |
| parent | fc732b34b28fc556f0a3a37c7f0d353dd6e1b424 (diff) | |
| parent | 6545a34dcd2562e4438cccb9b87c555d0709c83d (diff) | |
Merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
| -rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index bf5eda21eb..8ac51ee581 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -61,6 +61,7 @@ BOOL LLVertexBuffer::sVBOActive = FALSE; BOOL LLVertexBuffer::sIBOActive = FALSE; U32 LLVertexBuffer::sAllocatedBytes = 0; BOOL LLVertexBuffer::sMapped = FALSE; +BOOL LLVertexBuffer::sUseStreamDraw = TRUE; std::vector<U32> LLVertexBuffer::sDeleteList; @@ -382,6 +383,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; @@ -813,7 +819,7 @@ BOOL LLVertexBuffer::useVBOs() const return FALSE; } #endif - return sEnableVBOs; + return TRUE; } //---------------------------------------------------------------------------- @@ -1177,7 +1183,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask) { if (mGLBuffer) { - if (sEnableVBOs && sVBOActive) + if (sVBOActive) { glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0); sBindCount++; @@ -1189,7 +1195,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask) setup = TRUE; // ... or a client memory pointer changed } } - if (sEnableVBOs && mGLIndices && sIBOActive) + if (mGLIndices && sIBOActive) { /*if (sMapped) { |
