this post was submitted on 18 Jul 2025
91 points (97.9% liked)
Programming
21862 readers
234 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Back in the '90s, when you created a game, you had to build three separate game engines for DOS, Windows, and MacOS, with their separate audio and video drivers. Or you just selected DOS and ignored all Mac users.
SDL was revolutionary, it could create an OS window for you to draw onto (or emulate a full-screen 'window' for DOS), and output 2D video and sound using the same SDL calls, on DOS, Windows, MacOS, Linux, AmigaOS, and even Sony PlayStation. So you had the same source code compiling to 6 different game binaries for each platform.
SDL does not implement 3D graphics, it just initializes OpenGL in a window and passes that to your code, because the game studios went all 'fuck you I'm using OpenGL or I'm ignoring your XBOX entirely' so even Microsoft was forced to support OpenGL on top of it's incompatible proprietary DirectX 3D drivers, so OpenGL became the new standardized cross-platform API for 3D graphics.
Vulkan is a replacement for OpenGL which can use multiprocessor architecture, OpenGL is strictly single-threaded so your high-end 12-core gaming CPU ends up with one overworked core drawing all the graphics and 11 lazy cores performing Windows update in the background. The rules are already established, so every GPU and chip manufacturer will either support Vulkan or not have 3D graphics at all.
Those 11 lazy cores are actually working really hard at installing a new version of Notepad with Copilot and training it on every file on your PC
Thank you. I'll ask questions here, but might find out more while reading the other answers.
~~So, SDL provides a window with an OpenGL surface. What is OpenGL? Is it an API spec that can have multiple implementations like the opensource implementation that is Mesa? Is DirectX 3D the same just with a proprietary implementation?~~ @Kissaki@programming.dev answered this.
And when you say "Vulkan is multi-threaded", does that mean that the implementation uses instructions for drivers that target a multiple GPU cores? I would have expected the multi-threaded or parallelism aspect to be handled by the driver, not the driver client (in this case Vulkan or Mesa/OpenGL).
Anti Commercial-AI license
Yes, OpenGL is an open specification, it has multiple proprietary implementations, and an open-source implementation (MESA). DirectX 3D is a proprietary specification with proprietary implementations (and one open-source implementation in Wine), but it's essentially the same graphics driver API as OpenGL.
OpenGL uses multiple GPU cores, but GPU is controlled by a single CPU core. GPU does most of the work of course, but for some operations, like uploading a lot of textures when loading a level, or drawing a dynamic geometry with a lot of triangles, CPU becomes a bottleneck.