How are OpenGL orders given to GPU?

Hello,

I would like to understand how OpenGL code is sent to the GPU. I first thought that the opengl dll where specific to a GPU so the dll would have been the interface between OpenGL and the specific GPU, translating OpenGL code into GPU specific code, but it seems that the dll that are used are common to all GPUs. So my question is how is the link made between the dll (which does not know the GPU as it is not GPU specific) and the GPU itself? There must be “something” that knows that the code has to be sent to the GPU and not be rendered by the soft implementation of OpenGL that most OS have, but what is it, and how does that work? Any idea?

Thanks,

Antoine.

The dll on windows (opengl32.dll) redirects the calls into the ICD (installable client driver) that is provided by the GPU vendor. With simple words, when you have graphic card drivers installed, your commands will end in the driver, which sends them to the GPU.

p.s. This is not an advanced GL question ^^

The API is usually implemented by the companies who develop the hardware. As Zengar says the OpenGL32.dll layer you call through on windows simply calls into the driver functions provided by NVIDIA, ATI et.al. but it can still fall back to software rendering. Similar schemes exist on other platforms there is either a function table that calls through or there is a standard ABI where the linking can support it or both; e.g Linux has the ABI (application binary interface) and the compliant Open Source DRI (direct rendering infrastructure), not all implementations support the DRI e.g. NVIDIA’s drivers, but all are compliant with the ABI and so all applications linked correctly to OpenGL will make the appropriate binary calls to the installed OpenGL driver on the platform.

Very interesting answers… Thanks a lot!

Here’s another architecture example .