Search code examples
windowskerneldriver

If applications can't talk to device drivers, does it mean that OpenGL is implemented in DirectX in Windows?


I am a little confused, programs can't talk to device drivers right? Only the kernel has the privellege to talk to drivers so for system functionalities we need to make request to some functionality provided by the host?

In case of Windows it is DirectX, so does this mean OpenGL is implemented in DirectX? If not, how is OpenGL able to directly commmunicate with the GPU?


Solution

  • The OpenGL Installable Client Driver (ICD) has a user-mode and a kernel-mode portion. The kernel-mode portion is the part that communicates with the hardware.

    Note the default OpenGL installed on Windows is a software-only renderer, so it's using DirectX/GDI to do the actual output to the video card.

    Direct3D also has a user-mode and a kernel-mode portion, with the kernel-mode portion being the Windows Display Driver Model driver.

    Windows architecture

    See Microsoft Learn