6 ms·
I kind of don't see the benefit, as it's still going to use only the window, input and platform integrations features, while SDL3 has a whole software renderer
by revengerwizard 2mo ago
I kind of don't see the benefit, as it's still going to use only the window, input and platform integrations features, while SDL3 has a whole software renderer built-in and much more.
- superdisk 2mo agoYou can compile in only the used stuff with various build flags, not sure if they did that though. I've done that before to make a pared down SDL that only does audio playback.
- rbits 2mo agoThis fixed a lot of bugs related to input. If you scroll down to the bottom of the page you can see all the bug fixes from this snapshot, there are a lot related to input.
- nottorp 2mo ago> SDL3 has a whole software renderer Does this mean SDL3 has a built in 3d renderer or it's the modern meaning where anything is a serverless renderer or something like that?
- mort96 2mo agoSDL2 and SDL3 both have hardware accelerated 2D renderers, appropriately called SDL_Renderer. You can tell SDL to upload pixel buffers to GPU textures and tell SDL to draw those textures on the screen with various transformations and color effects. SDL3 added a way to tell SDL to render vertex-based geometry as well: https://wiki.libsdl.org/SDL3/SDL_RenderGeometry https://wiki.libsdl.org/SDL3/SDL_RenderGeometry. Those vertexes can have 3D positions, so that counts as a 3D renderer I guess. Though of course the GPU is doing the heavy lifting; SDL is just exposing a little bit more of the GPU's functionality. It's quite useful for some 2D applications as well. I remember reading about how it could enable more efficient drawing of 2D plots or cleaner ImGUI integration, though I don't remember details.
- kbolino 2mo agoSDL_RenderGeometry(Raw) are only capable of 2D rendering and the vertexes do not even have a z-coordinate. Genuine 3D support is available in SDL3 via the GPU types and functions: https://wiki.libsdl.org/SDL3/CategoryGPU https://wiki.libsdl.org/SDL3/CategoryGPU
- mort96 2mo agoOh, I stand corrected. Thanks!
- MindSpunk 2mo agoIf you want to get pedantic the hardware rasterizer in your GPU doesn't rasterize "3D triangles" either. Any notion of '3D' comes from how you project your vertices when transforming them through your coordinate spaces. Though the perspective divide needed to make perspective projection work is baked in, but otherwise NDC is a 2D space. Z only exists for the depth buffer/depth test and perspective correct interpolation. The "shape" of the triangle on screen isn't affected by it. As long as you can draw 2D triangles there's nothing stopping you from drawing a "3D" scene with a software transform pipeline. Depth sorting gets fun without a z-buffer though.
- account42 2mo agoExcept perspective correct interpolation isn't something you get to disregard in a footnote.
- deleted 2mo ago[deleted]