Sdl-gpu: A library for high-performance, modern 2D graphics with SDL
github.com
github.com
What exactly does this library bring to the table?
Edit: For example, check out this http://dinomage.com/reference/SDL_gpu/group__ShaderInterface...
Announcing a cool new library, application, or hack by dumping people into a GitHub repo is not what I'd call especially good marketing (to the extent anyone cares, obviously.) This is getting to be a bit of a pet peeve.
* Higher performance (it automatically collects and submits batches instead of separate draw commands for each sprite and redundant state changes)
* Shader API
* Arbitrary geometry rendering (triangles)
* Can be integrated with explicit OpenGL calls
* Full blend state control (not just "ADD", "SUB", "MULT")
* Built-in primitive shapes (points, lines, tris, rects, ellipses, polygons, even arcs)
* Uses a style familiar to SDL 1.2 users that I wish SDL_Renderer had gone with...
* Came out before SDL 2.0 and is compatible with SDL 1.2 and 2.0
* Loads BMP, TGA, and PNG files
* Rotates and scales about the center of images, making reasoning about the resulting corner coordinates more obvious (adjustable via anchor settings)
Hope that helps!
You can specify the rotation point in SDL2. Calculating corner coordinates is simple trigonometry.
But the rest seems useful.
Thanks.
Tell us more.
Everything else seems to be more pain in the ass than it is worth.
Lower latency? Yeah, CPU wins easily.
4k resolution 2D composition? Well, GPU is pretty likely to win this one...
CPU has pretty low latency, easily better than what GPU can achieve. But on the other hand GPU has insane bandwidth, high degree of parallelism and hardware ROPs.
On the other hand if you're wanting to make something with the graphical complication of Mario or Mega Man ( purely sprites - no effects - lighting and other things maybe done with alpha blending ) then you might find it makes sense to stick to working with the CPU.
Besides that, you can render so many more sprites if you properly batch them. I could get maybe a few hundred identical particles going around 60 fps with software rendering. With the GPU, you can make particle systems with thousands of sprites (or tens of thousands with a GPU newer than 2012).