this repo has no description
0
fork

Configure Feed

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

Added an alternate VBO upload path for testing.

+18 -4
+18 -4
SDL_gpu/GL_common/SDL_gpu_GL_common.inl
··· 3833 3833 return lowest; 3834 3834 } 3835 3835 3836 + static_inline void submit_buffer_data(int bytes, float* values) 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; 3842 + 3843 + memcpy(data, values, bytes); 3844 + 3845 + glUnmapBuffer(GL_ARRAY_BUFFER); 3846 + #else 3847 + glBufferSubData(GL_ARRAY_BUFFER, 0, bytes, values); 3848 + #endif 3849 + } 3836 3850 3837 3851 3838 3852 // Assumes the right format ··· 4003 4017 cdata->blit_VBO_flop = !cdata->blit_VBO_flop; 4004 4018 4005 4019 // Copy the whole blit buffer to the GPU 4006 - glBufferSubData(GL_ARRAY_BUFFER, 0, GPU_BLIT_BUFFER_STRIDE * (num_sprites*4), values); // Fills GPU buffer with data. 4020 + submit_buffer_data(GPU_BLIT_BUFFER_STRIDE * (num_sprites*4), values); // Fills GPU buffer with data. 4007 4021 4008 4022 // Specify the formatting of the blit buffer 4009 4023 if(cdata->current_shader_block.position_loc >= 0) ··· 4221 4235 cdata->blit_VBO_flop = !cdata->blit_VBO_flop; 4222 4236 4223 4237 // Copy the whole blit buffer to the GPU 4224 - glBufferSubData(GL_ARRAY_BUFFER, 0, stride * num_vertices, values); // Fills GPU buffer with data. 4238 + submit_buffer_data(stride * num_vertices, values); // Fills GPU buffer with data. 4225 4239 4226 4240 // Specify the formatting of the blit buffer 4227 4241 if(cdata->current_shader_block.position_loc >= 0) ··· 4599 4613 cdata->blit_VBO_flop = !cdata->blit_VBO_flop; 4600 4614 4601 4615 // Copy the whole blit buffer to the GPU 4602 - glBufferSubData(GL_ARRAY_BUFFER, 0, GPU_BLIT_BUFFER_STRIDE * num_vertices, blit_buffer); // Fills GPU buffer with data. 4616 + submit_buffer_data(GPU_BLIT_BUFFER_STRIDE * num_vertices, blit_buffer); // Fills GPU buffer with data. 4603 4617 4604 4618 // Specify the formatting of the blit buffer 4605 4619 if(cdata->current_shader_block.position_loc >= 0) ··· 4699 4713 cdata->blit_VBO_flop = !cdata->blit_VBO_flop; 4700 4714 4701 4715 // Copy the whole blit buffer to the GPU 4702 - glBufferSubData(GL_ARRAY_BUFFER, 0, GPU_BLIT_BUFFER_STRIDE * num_vertices, blit_buffer); // Fills GPU buffer with data. 4716 + submit_buffer_data(GPU_BLIT_BUFFER_STRIDE * num_vertices, blit_buffer); // Fills GPU buffer with data. 4703 4717 4704 4718 // Specify the formatting of the blit buffer 4705 4719 if(cdata->current_shader_block.position_loc >= 0)