News for hackers. Stuff that matters.

grimfang4

Re:Carbon Language: An experimental successor to C++ on Tuesday July 19, 2022 @01:13PM (#32154869)
It's an implication that the driving force for the development is money. By the way, jump on the GEEZ train, that stock's gonna go through the roof!
Re:Carbon Language: An experimental successor to C++ on Tuesday July 19, 2022 @12:56PM (#32154620)
Almost. C++0x did, but C++11 doesn't and some compilers/IDEs (e.g. VS) didn't implement full support for C++11 for years.
Ever tried rotating and scaling dozens of high-def sprites per frame in software (CPU)? Not good. Plenty of games can benefit from that ability.

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).

GPU_TriangleBatch() lets you submit an array of triangle vertex data. That way you can integrate with Spine, librocket, and everything else like that.
Hey, SDL_gpu dev here! :) There's actually a lot that is special about SDL_gpu, but most pertinent are:

* 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!