MAINT-2968 disable client GL namegen, go spec

This commit is contained in:
Siana Gearz
2013-10-13 17:07:45 +02:00
parent aa077032b7
commit 19625ea6b8
12 changed files with 47 additions and 161 deletions

View File

@@ -90,7 +90,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;
@@ -124,16 +123,8 @@ U32 LLVBOPool::genBuffer()
{
U32 ret = 0;
if (mGLNamePool.empty())
{
ret = sCurGLName++;
}
else
{
ret = mGLNamePool.front();
mGLNamePool.pop_front();
}
glGenBuffersARB(1, &ret);
return ret;
}
@@ -145,12 +136,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);
}
}
@@ -1304,7 +1292,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();