The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Batch drawing for opengl render
dalerank


Joined: 27 Apr 2015
Posts: 6
I need texture batching in my game (https://bitbucket.org/dalerank/caesaria)
but SDL2 havenot any native functions for this way, so i wrote small extension for OpenGL renderer that using batching
also it need to add 3 functions in SDL_render (SDL_create[destroy/draw]Batch)
source code you may see here
https://bitbucket.org/dalerank/caesaria/src/1e5ded0bd6ad66a51871c31785c7519390a16936/dep/sdl2mini/src/render/opengl/SDL_render_gl.c?at=booster.

What you think about this way?
BEFORE (2378 Draw calls)


AFTER(285 Draw calls)
[/img]