PDA

View Full Version : How are OpenGL orders given to GPU?



RockwoodGuitar
10-01-2006, 02:49 PM
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.

Zengar
10-01-2006, 02:59 PM
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 ^^

dorbie
10-01-2006, 08:52 PM
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.

RockwoodGuitar
10-02-2006, 12:13 AM
Very interesting answers... Thanks a lot!

arekkusu
10-02-2006, 07:13 AM
Here's another architecture example (http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_pg_concepts/chapter_2_section_2.html#//apple_ref/doc/uid/TP40001987-CH208-SW5) .