this post was submitted on 04 Mar 2025
47 points (100.0% liked)
Programming
18677 readers
116 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 [email protected]
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
Small word about OpenGL, as it seems confusing for many peoples:
OpenGL is a spec written by Kronos group. There is no such thing as OpenGL library, or OpenGL source code. You cannot "download" OpenGL. OpenGL is really just a buch of .txt files explaining how functions should be named and what they should do. This spec define an API.
Then, this API can be implemented by anyone, by writing code and putting it in a library.
GPU drivers implement this API. That means that Nvidia, AMD and Intel have their own implementation.
To have access to this API from your program, you have to "getProcAdress" all function you want to use from GPU driver's DLL. As this is quite painfull, libs exist, like glew, that do it for you. These libs are really just a long list of getProcAdress for all entry points.
That's also why you cannot "static link" with OpenGL. As function can only be retrieved at runtime.
Another interesting things is MESA. It's a CPU implementation of OpenGL spec. So MESA is a lib, with source code and so on. You can download it, link against it, etc... This is very useful when you want to do 3D without GPU (yes, this happen, especially in medical domain).