1 2 3 4 5 | HMODULE hOpenGL = LoadLibrary( "opengl32.dll" ); // GetProcAddress, not wglGetProcAddress PFNGLENABLEPROC glEnable = ( PFNGLENABLEPROC ) GetProcAddress( hOpenGL, "glEnable" ); ... FreeLibrary( hOpenGL ); |
mmozeiko
On Windows OpenGL 1.1 functions cannot be loaded with wglGetProcAddress. It will return NULL for them. Instead you need to reference them in OpenGL32.dll - either with linker or manually with GetProcAddress.
Basically easiest way to do is to call wglGetProcAddress first and then GetProcAddress if first one returned NULL.
strangezak
You use GLEW, GLAD, or something like that