diff options
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 49 |
1 files changed, 17 insertions, 32 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 0c8a8fed6a..f71403d2f4 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -404,11 +404,8 @@ U32 LLVertexBuffer::getVAOName() else { //#ifdef GL_ARB_vertex_array_object -#if GL_APPLE_vertex_array_object - glGenVertexArraysAPPLE(1, &ret); -#else glGenVertexArrays(1, &ret); -#endif +//#endif } return ret; @@ -761,11 +758,8 @@ void LLVertexBuffer::unbind() if (sGLRenderArray) { //#if GL_ARB_vertex_array_object -#if GL_APPLE_vertex_array_object - glBindVertexArrayAPPLE(0); -#else glBindVertexArray(0); -#endif +//#endif sGLRenderArray = 0; sGLRenderIndices = 0; sIBOActive = false; @@ -1265,11 +1259,8 @@ void LLVertexBuffer::setupVertexArray() LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX; //#if GL_ARB_vertex_array_object -#if GL_APPLE_vertex_array_object - glBindVertexArrayAPPLE(mGLArray); -#else glBindVertexArray(mGLArray); -#endif +//#endif sGLRenderArray = mGLArray; static const U32 attrib_size[] = @@ -1543,10 +1534,12 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran { if (map_range) { -#if !LL_MESA_HEADLESS && GL_APPLE_flush_buffer_range && LL_DARWIN +/* +#ifndef LL_MESA_HEADLESS glBufferParameteriAPPLE(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_FALSE); glBufferParameteriAPPLE(GL_ARRAY_BUFFER_ARB, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE); #endif +*/ src = (U8*) glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); } else @@ -1716,10 +1709,12 @@ U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range) { if (map_range) { -#if !LL_MESA_HEADLESS && GL_APPLE_flush_buffer_range && LL_DARWIN +/* +#ifndef LL_MESA_HEADLESS glBufferParameteriAPPLE(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_FALSE); glBufferParameteriAPPLE(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE); #endif +*/ src = (U8*) glMapBuffer(GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY); } else @@ -1845,17 +1840,13 @@ void LLVertexBuffer::unmapBuffer() S32 length = sTypeSize[region.mType]*region.mCount; if (gGLManager.mHasMapBufferRange) { -#if GL_APPLE_flush_buffer_range && LL_DARWIN - glFlushMappedBufferRangeAPPLE(GL_ARRAY_BUFFER, offset, length); -#elif GL_ARB_map_buffer_range || GL_EXT_map_buffer_range +#if GL_ARB_map_buffer_range || GL_EXT_map_buffer_range glFlushMappedBufferRange(GL_ARRAY_BUFFER, offset, length); #endif } else if (gGLManager.mHasFlushBufferRange) { -#if !LL_MESA_HEADLESS && GL_APPLE_flush_buffer_range && LL_DARWIN - glFlushMappedBufferRangeAPPLE(GL_ARRAY_BUFFER, offset, length); -#else +#ifndef LL_MESA_HEADLESS glFlushMappedBufferRange(GL_ARRAY_BUFFER, offset, length); #endif } @@ -1929,20 +1920,20 @@ void LLVertexBuffer::unmapBuffer() S32 length = sizeof(U16)*region.mCount; if (gGLManager.mHasMapBufferRange) { -#if GL_APPLE_flush_buffer_range && LL_DARWIN - glFlushMappedBufferRangeAPPLE(GL_ELEMENT_ARRAY_BUFFER, offset, length); -#elif GL_ARB_map_buffer_range || GL_EXT_map_buffer_range +#if GL_ARB_map_buffer_range || GL_EXT_map_buffer_range glFlushMappedBufferRange(GL_ELEMENT_ARRAY_BUFFER, offset, length); #endif } + /* else if (gGLManager.mHasFlushBufferRange) { -#if GL_APPLE_flush_buffer_range && LL_DARWIN +#ifdef GL_APPLE_flush_buffer_range #ifndef LL_MESA_HEADLESS glFlushMappedBufferRangeAPPLE(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length); #endif #endif } + */ stop_glerror(); } @@ -2080,11 +2071,8 @@ bool LLVertexBuffer::bindGLArray() { LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX; //#if GL_ARB_vertex_array_object -#if GL_APPLE_vertex_array_object - glBindVertexArrayAPPLE(mGLArray); -#else glBindVertexArray(mGLArray); -#endif +//#endif sGLRenderArray = mGLArray; } @@ -2313,11 +2301,8 @@ void LLVertexBuffer::setBuffer(U32 data_mask) if (sGLRenderArray) { //#if GL_ARB_vertex_array_object -#if GL_APPLE_vertex_array_object - glBindVertexArrayAPPLE(0); -#else glBindVertexArray(0); -#endif +//#endif sGLRenderArray = 0; sGLRenderIndices = 0; sIBOActive = false; |