Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenGL32 library

Tags:

c++

opengl

I have missing opengl32 library (more details: mingw32 w64 missing OpenGL32 lib). I have several questions related to this library:

  1. Why I need opengl32 static library ( I have .dll)?
  2. Why video card vendors does not provide this library?
  3. Who should provide it?
  4. Is there a source code of opengl32 library?
  5. Why I need GLEW or other GL library implementations (to use all features of OpenGL) if there is opengl32? Why opengl32 cannot have all required GL implementation?
like image 462
user14416 Avatar asked Dec 06 '25 08:12

user14416


2 Answers

Why I need opengl32 static library ( I have .dll)?

It provides the symbol table for the linker. The symbol table tells the linker which functions are provided by the library, so that the linker knows how to tie the symbols used in the program, to the libraries linked.

Note that on other OSs than windows, the "DLL" does also provide the symbol tables.

Why video card vendors does not provide this library?

Because the library is part of the OS interfaces to the driver system

Who should provide it?

The DLL: The OS vendor. The symbol table library: The compiler vendor.

Is there a source code of opengl32 library?

OpenGL itself is just a specification. What you have on your computer is a implementation and a interface. The interface is part of the OS. Hence on closed source OSs there is no source code available, but on open source OSs there is.

Why I need GLEW or other GL library implementations (to use all features of OpenGL) if there is opengl32?

opengl32.dll is just a interface to the driver system. This interface needs to be the smallest common denominator of OpenGL features, so that a wide range of OpenGL versions and capabilities can be offered through a common interface. However you also want to be able to access newer, and bleeding edge features, for which the extension mechanism exists.

Why opengl32 cannot have all required GL implementation?

opengl32.dll is part of the operating system and if it were part of the OS, then every new version of OpenGL would require a OS update. This is, in fact, the situation of MacOS X.

Also the OpenGL implementation is part of the driver, not the DLL.

like image 69
datenwolf Avatar answered Dec 07 '25 22:12

datenwolf


  1. It's not a static library, it's the library to dynamically link to the DLL.
  2. Because it's a part of the OS, more or less. The symbols exported from OpenGL32.dll tend to be standard (a particular set of gl... functions) and Microsoft-specific (wgl ones at least). The publicly-known ones don't vary between vendors.
  3. Microsoft does provide it, with their compilers. Any other compiler vendor should as well, since libs can be somewhat compiler-specific.
  4. Mesa is an open-source OpenGL implementation, so the closest you'll get.
  5. You don't, you can get the strings and function pointers manually, it's just extremely tedious. GLEW et al do most of the feature-checks and initialization for you. They don't do anything you can do directly with OpenGL32.dll, but they do make life a lot easier.
like image 26
ssube Avatar answered Dec 07 '25 21:12

ssube



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!