3D in SDL

I don’t know much about 3D, maybe it’s time to do it…
What to use? The SDL documentation seems to be fading away, but there is some support for OpenGl and Vulkan… Or maybe something else? What are the differences ? Ease of use/learning is important to me. How does it work on Android (including older versions like 5.0)? How to start learning?

SDL doesn’t (currently) have any functionality for 3D beyond creating a window and surface/layer to draw into. For OpenGL it can also create an OpenGL context for you, but that’s the only API it does that for.

At some point this is going to change, whenever SDL_GPU gets merged in. Then it’ll have its own 3D API abstraction that sits on top of Metal/Vulkan/DirectX12.

OpenGL is the easiest to learn, and available on Windows, Linux, and Macs, but it’s been abandoned; there aren’t any new versions being worked on. GPU vendors apparently aren’t updating their OpenGL drivers on Windows anymore. It’s officially deprecated in Apple land; on M-series Macs and all iDevices, OpenGL is actually implemented on top of Metal.

Vulkan is the hardest to learn. The only place Vulkan seems popular for game dev is Linux (incl. Android), where it’s the only low-level 3D API.

Metal is between OpenGL and Vulkan in terms of difficulty to learn. It’s Apple-only.

DirectX 11 seems a tad harder than OpenGL to learn. It’s Windows-only (IDK if you can still ship Xbox games that use DX11).

DirectX 12 is on-par with Vulkan in difficulty to learn. It’s only available on Windows and Xbox.