summaryrefslogtreecommitdiff
path: root/indra/llrender/llvertexbuffer.cpp
diff options
context:
space:
mode:
authorScott Lawrence <oz@lindenlab.com>2013-10-16 17:24:32 -0400
committerScott Lawrence <oz@lindenlab.com>2013-10-16 17:24:32 -0400
commit7ba4fc06f351dc09bf3cac6cc768a11302ce5598 (patch)
tree256001700bd19cead3e198727ecf6ce80c7ac998 /indra/llrender/llvertexbuffer.cpp
parent9c313aea13c70db145d3f2ba840fdc34ed8c8adf (diff)
parentc7057c141c38492bfdc2bfe9d82de97a7364f01b (diff)
Merged 3.6.8-release
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rwxr-xr-xindra/llrender/llvertexbuffer.cpp22
1 files changed, 5 insertions, 17 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index f168b3af14..e6f20cd40e 100755
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -91,7 +91,6 @@ LLVBOPool LLVertexBuffer::sDynamicIBOPool(GL_DYNAMIC_DRAW_ARB, GL_ELEMENT_ARRAY_
U32 LLVBOPool::sBytesPooled = 0;
U32 LLVBOPool::sIndexBytesPooled = 0;
-U32 LLVBOPool::sCurGLName = 1;
std::list<U32> LLVertexBuffer::sAvailableVAOName;
U32 LLVertexBuffer::sCurVAOName = 1;
@@ -125,16 +124,8 @@ U32 LLVBOPool::genBuffer()
{
U32 ret = 0;
- if (mGLNamePool.empty())
- {
- ret = sCurGLName++;
- }
- else
- {
- ret = mGLNamePool.front();
- mGLNamePool.pop_front();
- }
-
+ glGenBuffersARB(1, &ret);
+
return ret;
}
@@ -146,12 +137,9 @@ void LLVBOPool::deleteBuffer(U32 name)
glBindBufferARB(mType, name);
glBufferDataARB(mType, 0, NULL, mUsage);
-
- llassert(std::find(mGLNamePool.begin(), mGLNamePool.end(), name) == mGLNamePool.end());
-
- mGLNamePool.push_back(name);
-
glBindBufferARB(mType, 0);
+
+ glDeleteBuffersARB(1, &name);
}
}
@@ -1333,7 +1321,7 @@ void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create)
//actually allocate space for the vertex buffer if using VBO mapping
flush();
- if (gGLManager.mHasVertexArrayObject && useVBOs() && (LLRender::sGLCoreProfile || sUseVAO))
+ if (gGLManager.mHasVertexArrayObject && useVBOs() && sUseVAO)
{
#if GL_ARB_vertex_array_object
mGLArray = getVAOName();