Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is vendor's OpenGL driver located in Windows?

I'm going try to experiment C# with OpenGL modern driver in Windows 10 and I'm trying to find it.

As I have understand the standard driver Openg32.dll, which is located at %systemroot%\system32 is an old one and seems to be it's from Microsoft, am I right?

I came to this conclusion, because of using the next command:

dumpbin opengl32.dll /exports

And found the function:

11 A 00090330 glBegin

As I remember, this function as glLoadIdentity, glMultMatrix, glTranslate, glRotate are deprecated and NOT included since OpenGL 3.2+, because you have to do matrix math on your own & use shaders.

OK, I begin to search at NVidia directory (the vendor of my video card is NVidia) C:\Program Files\NVIDIA Corporation, but have found only OpenCL drivers C:\Program Files\NVIDIA Corporation\OpenCL:

  • OpenCL.dll
  • OpenCL64.dll

Any of them is perfectly dumped via: dumpbin /exports But I can't find here the OpenGL driver exactly. Maybe it has some specific name like nvdisps.dll or something else?

PS (if you ask me about)

  • I know about, that it's more recommended to use C++ for this stuff
  • I don't want to use already done libraries
  • I want P/Invoke stuff and just try to do it with C#

1 Answers

The opengl32.dll acts as a "conduit" toward the actual OpenGL driver, the so called "ICD" (Installable Client Driver); it also contains OpenGL-1.1 fallback code, since OpenGL has been part of the Win32-API application binary interface contract (i.e. programs running on Win95b or WinNT-4 or later can expect a working OpenGL-1.1 implementation).

The vendor ICD registers itself (in the Windows registry, for details see https://msdn.microsoft.com/en-us/library/windows/hardware/ff568203%28v=vs.85%29.aspx) and the opengl32.dll loads the appropriate ICD. The name of the ICD is not fixed. You can easily find the used ICD, by passing an invalid pointer to a OpenGL function that expects a buffer; the access violation will happen inside the ICD's code.

like image 52
datenwolf Avatar answered Dec 07 '25 15:12

datenwolf



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!