this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Made iOS use glBufferData instead of glBufferSubData, which turned out to be the synchronization bottleneck.

+19 -9
+3
SDL_gpu/GLES_2/SDL_gpu_GLES_2.c
··· 14 14 // Most of the code pulled in from here... 15 15 #define SDL_GPU_USE_GLES 16 16 #define SDL_GPU_USE_BUFFER_PIPELINE 17 + #ifdef __IPHONEOS__ 18 + #define SDL_GPU_USE_BUFFER_RESET 19 + #endif 17 20 #define SDL_GPU_SKIP_ENABLE_TEXTURE_2D 18 21 #define SDL_GPU_ASSUME_SHADERS 19 22 #define SDL_GPU_GL_TIER 3
+4 -1
SDL_gpu/GLES_2/SDL_gpu_GLES_2.h
··· 21 21 #define glVertexAttribI1ui glVertexAttrib1f 22 22 #define glVertexAttribI2ui glVertexAttrib2f 23 23 #define glVertexAttribI3ui glVertexAttrib3f 24 - #define glVertexAttribI4ui glVertexAttrib4f 24 + #define glVertexAttribI4ui glVertexAttrib4f 25 + #define glMapBuffer glMapBufferOES 26 + #define glUnmapBuffer glUnmapBufferOES 27 + #define GL_WRITE_ONLY GL_WRITE_ONLY_OES 25 28 #endif 26 29 27 30
+12 -8
SDL_gpu/GL_common/SDL_gpu_GL_common.inl
··· 3835 3835 3836 3836 static_inline void submit_buffer_data(int bytes, float* values) 3837 3837 { 3838 - #ifdef SDL_GPU_USE_MAP_BUFFER 3839 - float* data = (float*)glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); 3840 - if(data == NULL) 3841 - return; 3838 + #ifdef SDL_GPU_USE_BUFFER_PIPELINE 3839 + #ifdef SDL_GPU_USE_BUFFER_MAPPING 3840 + float* data = (float*)glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); 3841 + if(data == NULL) 3842 + return; 3842 3843 3843 - memcpy(data, values, bytes); 3844 + memcpy(data, values, bytes); 3844 3845 3845 - glUnmapBuffer(GL_ARRAY_BUFFER); 3846 - #else 3847 - glBufferSubData(GL_ARRAY_BUFFER, 0, bytes, values); 3846 + glUnmapBuffer(GL_ARRAY_BUFFER); 3847 + #elif defined(SDL_GPU_USE_BUFFER_RESET) 3848 + glBufferData(GL_ARRAY_BUFFER, bytes, values, GL_STREAM_DRAW); 3849 + #else 3850 + glBufferSubData(GL_ARRAY_BUFFER, 0, bytes, values); 3851 + #endif 3848 3852 #endif 3849 3853 } 3850 3854