Reputation: 860
I am trying to acquire additional openGL functions e.g. glCreateShader(), using wglGetProcAddress at runtime, as described in many tutorials. The return value however is NULL and no shader-related functions can be found.
How can this problem be solved? Thanks!! :-)
Upvotes: 0
Views: 226
Reputation: 860
I have solved this problem. The openGL context must be created first, and the pixel format must be selected and suitable for the set of extensions you want.
If you do not do the above, wglGetProcAddress will not find your extensions.
Upvotes: 1
Reputation: 98348
Those functions are provided by the graphics driver. So you have 2 options:
Note that there are many of low-end graphics cards that simply cannot do what that extensions require, so their manufacturers will never provide them.
Upvotes: 1