I tried to use WGL_ARB_pbuffer to render a screen with OpenGL,
but during initialization I failed. Here is my code.wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC) wglGetProcAddress("wglGetExtensionsStringARB");
if(!wglGetExtensionsStringARB) return;
const GLubyte* extensions = (const GLubyte*) wglGetExtensionsStringARB(wglGetCurrentDC());
So actually it ends on line 2 because wglGetExtensionsStringARB got NULL.
I have no idea why wglGetProcAddress is not working. I included "wglext.h" and also I defined as below in the header.PFNWGLGETEXTENSIONSSTRINGARBPROC pwglGetExtensionsStringARB = 0;
#define wglGetExtensionsStringARB pwglGetExtensionsStringARB
Why can't I use wglGetProcAddress as I expected?
source
share