4 ms·
> SDL may rename the application’s main to SDL_main and substitute its own C main Wow ok. This FAQ[0] is for windows but I guess the same applied for linux. >
by skywal_l 4y ago
> SDL may rename the application’s main to SDL_main and substitute its own C main
Wow ok. This FAQ[0] is for windows but I guess the same applied for linux.
> A software renderer fallback is exactly the behavior you want!
Apart from the fact that I don't see this situation happening in the context of gaming, if it were to happen, I am not sure that this behavior is always desirable. If your game has a sufficiently complex render loop, a software renderer might be too slow and will generate support calls. You might want to be upfront with the user and fail with a meaningful error message especially if you claim the need of a GPU on your system as a minimal requirement. The user might have a GPU but badly configured on their system for example.
So the gist of this article is that SDL is a framework and if you commit to a framework you might has well commit fully. SDL having an API that goes beyond graphics, you might find the API you need for a particular purpose and not use the system one to keep you software as portable as possible.
The thing is, I see SDL as a way to get a graphical window as cheaply as possible. I don't necessarily see it as a framework. I actually have a deep, and probably irrational, mistrust of frameworks.
[0] https://wiki.libsdl.org/SDL2/FAQWindows#i_get_undefined_reference_to_sdl_main_ https://wiki.libsdl.org/SDL2/FAQWindows#i_get_undefined_refe......
Edit: added a conclusion
- TheChaplain 4y agoI think you've misunderstood SDL a bit. It's just a very low-level framework to get access to the canvas, events, inputs, sound etc., on multiple platforms. The hardware acceleration is for simple blits and texture painting which is fine for most 2d games. If you want anything more than the very basics, there's always Godot or Unity.
- krapp 4y agoFWIW, SDL has a geometry API now too. It's basic (and only good for 2D) but you can push triangles and textured quads without OpenGL.
- Keyframe 4y agoSet up windowing (to get to your OpenGL/Vulkan/DX/whatever), input (is it low latency), maybe timers and maybeeee audio. .so loading and function lookup is useful, but is anyone actually using SDL threads and networking?
- reassembled 4y agoMy friend used SDL_Thread and SDL_Net in his game. They’re just platform threading and socket abstractions, respectively. https://deftware.itch.io/bitphoria https://deftware.itch.io/bitphoria