does opengl use the OS video driver or is it a video driver?

I don’t understand one thing : when Opengl is hardware implemented, does it use the video driver of my OS or is it a full video driver provided by the video card manufacturer.
On Windows, I have a dll called opengl32 that I can download from a lot of sites on the internet. So this dll is not provided by the video card manufacturer. Does this dll make calls to directX to implement OpenGL?

Thanks in advance.

OpenGL32.dll is a part of the Microsoft Windows 32 bit OS which comes with all NT, W2K, WXP based installations. Only on W9x you needed to add these. As part of the OS you must not replace it with any other implementation. WXP won’t let you anyway, because of the System File Check feature.
The OpenGL32.dll contains Microsoft’s GDI Generic OpenGL implementation. It’s normally rendering in SW into a memory bitmap, not with Direct3D.
Graphics board vendors ship an “Installable Client Driver” (ICD) with their video drivers and if this is correctly installed, Microsoft’s OpenGL32.dll reroutes application’s OpenGL calls to the ICD and everything is under the ICD’s control then. It will report additional hardware accelerated pixelformats to choose from.
That means your applications don’t need to be recompiled and linked with some other libs than OpenGL32.lib to use the graphics hardware, but just work in hardware if they request the according pixelformat.

okayyy! Thanks a lot!

I have still a question if someone has patience…
For using opengl, you have to interact with the windowing system of your OS. For that there are libraries like wgl and glx. How these libraries do the bridge between opengl and the windowing system? How do they tell to opengl “here is your frame buffer”?

To know that, you will surely need to sign an NDA with ATi or Nvidia or 3dlabs etc :smiley:

In fact it is the video driver which does the bridge between the windowing system and the hardware.

For the xx time, thank you ZBuffer!

The way to think of these things is that the OS defines the framework & programming interface for applications and some implementation details, the expected behavior is documented for input to the interface, sometimes very clearly in the case of OpenGL sometimes less so. The driver and hardware combination implements this behavior.

A graphics driver package pretty much implements the whole shebang, the GDI, D3D, OpenGL. The details of how they do this is known for some stuff or at least derived from a common ancestor code base, for example the OpenGL ‘Installable Client Driver’ on windows or the Direct Rendering Infrastructure on Linux. However the application calling the defined ABI doesn’t have to worry about this stuff and implementors can change the implementation over time keeping the details hidden. A good example is the DRI on Linux, most OpenGL drivers use this system to implement hardware accelerated drivers in XFree86 4.0, but NVIDIA has their own system that they use as a dropin replacement, applications making the documented calls don’t need to worry about this because it just works on a correctly configured system.

Read up on the DRI if you’re really interested in the details of 3D acceleration implementation on the desktop. Remember that this is just one system.