diff options
author | Erik Kundiman <erik@megapahit.org> | 2023-09-07 21:19:31 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2023-09-07 21:19:31 +0800 |
commit | d328f2efb2d22e690a5461f4ba2d2eeb6603ac8f (patch) | |
tree | db4a98a9a503627bbdb9db0bd34ee7560dddc927 | |
parent | b47d2a1c0e432483d93693de58956367a3c935d6 (diff) |
Bring back glBufferParameteriAPPLE
GL_APPLE_flush_buffer_range is defined on other platforms such as FreeBSD
but there would failure to link, hence the extra LL_DARWIN.
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index f71403d2f4..4064d35753 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -1534,12 +1534,10 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran { if (map_range) { -/* -#ifndef LL_MESA_HEADLESS +#if !LL_MESA_HEADLESS && GL_APPLE_flush_buffer_range && LL_DARWIN 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 @@ -1709,12 +1707,10 @@ U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range) { if (map_range) { -/* -#ifndef LL_MESA_HEADLESS +#if !LL_MESA_HEADLESS && GL_APPLE_flush_buffer_range && LL_DARWIN 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 @@ -1924,16 +1920,14 @@ void LLVertexBuffer::unmapBuffer() glFlushMappedBufferRange(GL_ELEMENT_ARRAY_BUFFER, offset, length); #endif } - /* else if (gGLManager.mHasFlushBufferRange) { -#ifdef GL_APPLE_flush_buffer_range +#if GL_APPLE_flush_buffer_range && LL_DARWIN #ifndef LL_MESA_HEADLESS glFlushMappedBufferRangeAPPLE(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length); #endif #endif } - */ stop_glerror(); } |