diff options
author | Loren Shih <seraph@lindenlab.com> | 2011-05-20 14:56:10 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2011-05-20 14:56:10 -0400 |
commit | 6f5313caea9bb8458dca23bbaf4f10cd6641c7fb (patch) | |
tree | ac34191250860e5f250cf1cc2e9199cdaa8204f6 /indra/llrender/llvertexbuffer.cpp | |
parent | eb8221338e0276b9afe8d92738166f97782d48d6 (diff) | |
parent | 0b612741d53a044a0179e1c32018bf8cd4213631 (diff) |
automated merge mesh-development -> davep-mesh-candidate-2010
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 73efbfc999..8c9171ccf4 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -383,10 +383,6 @@ void LLVertexBuffer::initClass(bool use_vbo, bool no_vbo_mapping) } sDisableVBOMapping = sEnableVBOs && no_vbo_mapping ; - LLGLNamePool::registerPool(&sDynamicVBOPool); - LLGLNamePool::registerPool(&sDynamicIBOPool); - LLGLNamePool::registerPool(&sStreamVBOPool); - LLGLNamePool::registerPool(&sStreamIBOPool); } //static @@ -633,7 +629,7 @@ void LLVertexBuffer::createGLBuffer() { static int gl_buffer_idx = 0; mGLBuffer = ++gl_buffer_idx; - mMappedData = (U8*) malloc(size); + mMappedData = (U8*) ll_aligned_malloc_16(size); } } @@ -667,7 +663,7 @@ void LLVertexBuffer::createGLIndices() } else { - mMappedIndexData = (U8*) malloc(size); + mMappedIndexData = (U8*) ll_aligned_malloc_16(size); static int gl_buffer_idx = 0; mGLIndices = ++gl_buffer_idx; } @@ -690,7 +686,7 @@ void LLVertexBuffer::destroyGLBuffer() } else { - free(mMappedData); + ll_aligned_free_16(mMappedData); mMappedData = NULL; mEmpty = TRUE; } @@ -719,7 +715,7 @@ void LLVertexBuffer::destroyGLIndices() } else { - free(mMappedIndexData); + ll_aligned_free_16(mMappedIndexData); mMappedIndexData = NULL; mEmpty = TRUE; } @@ -852,8 +848,8 @@ void LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices) { if (!useVBOs()) { - free(mMappedData); - mMappedData = (U8*) malloc(newsize); + ll_aligned_free_16(mMappedData); + mMappedData = (U8*) ll_aligned_malloc_16(newsize); } mResized = TRUE; } @@ -873,8 +869,8 @@ void LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices) { if (!useVBOs()) { - free(mMappedIndexData); - mMappedIndexData = (U8*) malloc(new_index_size); + ll_aligned_free_16(mMappedIndexData); + mMappedIndexData = (U8*) ll_aligned_malloc_16(new_index_size); } mResized = TRUE; } @@ -915,8 +911,8 @@ void LLVertexBuffer::freeClientBuffer() { if(useVBOs() && sDisableVBOMapping && (mMappedData || mMappedIndexData)) { - free(mMappedData) ; - free(mMappedIndexData) ; + ll_aligned_free_16(mMappedData) ; + ll_aligned_free_16(mMappedIndexData) ; mMappedData = NULL ; mMappedIndexData = NULL ; } @@ -926,7 +922,7 @@ void LLVertexBuffer::allocateClientVertexBuffer() { if(!mMappedData) { - mMappedData = (U8*)malloc(getSize()); + mMappedData = (U8*)ll_aligned_malloc_16(getSize()); } } @@ -934,7 +930,7 @@ void LLVertexBuffer::allocateClientIndexBuffer() { if(!mMappedIndexData) { - mMappedIndexData = (U8*)malloc(getIndicesSize()); + mMappedIndexData = (U8*)ll_aligned_malloc_16(getIndicesSize()); } } |