SDL's 2D Render API Getting Improved With New Batching System
Prolific Linux game porter/developer Ryan Gordon has been tackling improvements to the SDL2 library's 2D rendering code with the introduction of a batching system.
With the current SDL2 library when using its render API, calls are immediately dispatched where as with this batching system the draw requests are stored in batches and then dispatched to the GPU when needed. Those batches are sent to the GPU when needed via SDL_RenderPresent or other relevant operations.
This batching leads to more efficient usage but can be toggled via the SDL API since this batching system could cause problems if the application is also using the underlying graphics API directly, among other potential complexities
Ryan merged this initial render batching system code today in what will eventually become SDL 2.0.9.
Ryan's rendering code rework has also led to significant optimizations for the OpenGL ES renderer back-end, moving the OpenGL / OpenGL ES / Metal code over to this new batching system, and also adding some new high-level features. Some of those other higher-level changes to the SDL2 render code are outlined in this commit.
With the current SDL2 library when using its render API, calls are immediately dispatched where as with this batching system the draw requests are stored in batches and then dispatched to the GPU when needed. Those batches are sent to the GPU when needed via SDL_RenderPresent or other relevant operations.
This batching leads to more efficient usage but can be toggled via the SDL API since this batching system could cause problems if the application is also using the underlying graphics API directly, among other potential complexities
Ryan merged this initial render batching system code today in what will eventually become SDL 2.0.9.
Ryan's rendering code rework has also led to significant optimizations for the OpenGL ES renderer back-end, moving the OpenGL / OpenGL ES / Metal code over to this new batching system, and also adding some new high-level features. Some of those other higher-level changes to the SDL2 render code are outlined in this commit.
5 Comments