wglGetProcAddress returns NULL

前端 未结 1 2084
猫巷女王i
猫巷女王i 2021-02-10 21:43

I was trying to use WGL_ARB_pbuffer for offscreen rendering with OpenGL,

but I was failed during initialization.

Here is my code.

wglGetExtensionsStringA         


        
1条回答
  •  不思量自难忘°
    2021-02-10 22:16

    wglGetProcAddress requires an OpenGL rendering context; you need to call your wglCreateContext and wglMakeCurrent prior to calling wglGetProcAddress. If you have not already setup an OpenGL context, wglGetProcAddress will always return NULL. If you're not sure if you have an OpenGL context yet (for example, if you're using a 3rd party framework/library), call wglGetCurrentContext and check to make sure it's not returning NULL.

    0 讨论(0)
提交回复
热议问题