All I want from the SDL (as I wrote earlier in other topics):
- Real batching for difficult situations (as an example, the particle system above). To do this, transfer the colors from the uniforms to the vertex, since changing the uniforms breaks the pipeline. And also you need to add batching of the same textures (again, for the example of the particle system, one texture make 1000 draw calls instead of once).
- Simple API for drawing a triangle. 2D triangle.
All this is done quite simply and does not break the ideology that SDL is Simple.
As an example of what I did (for myself, I only implemented GLES 2 and D3D9, but the rest are not difficult to implement either):
typedef struct SDL_Vertex
{
SDL_FPoint pos;
SDL_FPoint tex;
SDL_Color color;
} SDL_Vertex;
extern DECLSPEC int SDLCALL SDL_RenderDrawArray(SDL_Renderer *renderer, SDL_Texture *texture, SDL_Vertex *sdl_vertices, int offset, int count);
And this allows you to do a lot out of the box (without using complex libraries like bgfx or writing your own render) SDL_demo.wmv (3.8 MB) (sorry for the quality, but the site has a file size limit of 4096 KB).