Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Unreal/Unity are not the only solutions. There is also bgfx (https://github.com/bkaradzic/bgfx), which is quite popular and sokol gfx (https://github.com/floooh/sokol) which I know of. Of course there are many more lesser known ones.


Compared to libraries like bgfx and sokol at least, I think there are two key differences.

1) SDL_gpu is a pure C library, heavily focused on extreme portability and no depedencies. And somehow it's also an order of magnitude less code than the other options. Or at least this is a difference from bgfx, maybe not so much sokol_gfx.

2) The SDL_gpu approach is a bit lower level. It exposes primitives like command buffers directly to your application (so you can more easily reason about multi-threading), and your software allocates transfer buffers, fills them with data, and kicks off a transfer to GPU memory explicitly rather than this happening behind the scenes. It also spawns no threads - it only takes action in response to function calls. It does take care of hard things such as getting barriers right, and provides the GPU memory allocator, so it is still substantially easier to use than something like Vulkan. But in SDL_gpu it is extremely obvious to see the data movements between CPU and GPU (and memory copies within the CPU), and to observe the asynchronous nature of the GPU work. I suspect the end result of this will be that people write far more efficient renderers on top of SDL_gpu than they would have on other APIs.


Qt RHI too. Shaders are normal vulkan-compatible GLSL and then you get D3D11, 12, GL and Metal



Bit late to the party, but do you have experience with using NVRHI and can tell how useful / simple it is to get started with doing some hobbyist / bordering serious work?


Check the donut examples: https://github.com/NVIDIAGameWorks/donut_examples

A bit dense, but I find it easier to understand and maintain than bgfx. Not as easy as sokol or magnum.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: