1

i use visual studio, and in all the tutorials on setting it up I have seen, they say to put opengl32.lib in the linker's additional dependencies. But where is opengl32.lib located? opengl32.dll is in my system32 folder, but I have not found opengl32.lib anywhere.

Now for glad. If glad is a function loader for opengl because the opengl32.lib that windows supplies is only version 1.1, then why did i need to include my useless opengl32.lib? And also, where do these functions come from? Theyre not in the old opengl32.lib. In looking it up, apparently glad loads opengl32.dll itself, so why did i include the opengl static lib? And is opengl32.dll also version 1.1? If so, where is glad loading the newer functions from?

genpfault
  • 51,148
  • 11
  • 85
  • 139
desp_cl
  • 11
  • 2

1 Answers1

2

OpenGL is built incrementally, with all previous versions' functions included in the next version. So opengl32.lib loads the base 1.1 functions (glEnable etc), and the rest of the functions have to be manually loaded from the DLL, which is what your loader does.

opengl32.dll also version 1.1?

No, your graphics driver provides that DLL with all the functions it supports.

Blindy
  • 65,249
  • 10
  • 91
  • 131
  • I see, why doesnt glad just load the base 1.1 functions as well so I do not have to link against opengl32.lib? – desp_cl Jun 07 '22 at 16:09
  • @desp_cl "I see, why doesnt glad just load the base 1.1 functions as well so I do not have to link against opengl32.lib?" It already does (and always did), and you don't have to link `opengl32.lib` _at all_. – derhass Jun 07 '22 at 21:46