Issue #23 on hold

IntGetProcAddress("glGetStringi") returns NULL

Anonymous created an issue

in ogl_LoadFunctions() IntGetProcAddress("glGetStringi") returns NULL

windows 8 NVidia Geforce 210 with the new official driver

Comments (14)

  1. Jason McKesson repo owner

    The only reason you could get NULL from that function call is if your OpenGL context didn't match the expected version number. In particular, if your OpenGL version is not 3.3 (or technically, not 3.0 or better). Since the loader is trying to load the 3.3 functions and such, if you don't have a context of that version, it has failed to load. So it returns that it failed to load.

    You are likely getting a non-accelerated OpenGL context or something. If you're using a laptop, you're probably getting some kind of Optimus issue, where you're actually getting Intel's OpenGL instead of NVIDIA's.

  2. ronaldronald

    I have used "GPU Caps Viewer" to check OpenGL version. It shows as below: Main Caps Render Model: GeForce 210/PCIe/SSE2 OpenGL Version: 3.3.0 Max tess level: 0 GLSL version: 3.30 NVIDIA via Cg compiler Viewport: 8192 Texture size: 8192 Num MRT: 8

  3. Jason McKesson repo owner

    I installed the newest driver and the card supports OpenGL 3.3

    I didn't ask about either of those. This is not about what your card supports. It's about what your program gets when it creates an OpenGL context. Not what GPU Caps Viewer says, the actual program you're trying to use the glLoadGen generated files with.

    You're creating a core OpenGL context, so you must ask for an OpenGL version, yes? Does your context creation code work?

  4. Jiho Choi

    For my case, wglGetProcAddress("glGetStringi") was NULL before calling wglCreateContext(). If I call ogl_LoadFunctions() after wglCreateContext(), it was OK.

  5. Constantine

    Jiho Choi exactly, thanks! In my case it was GLFW, on Windows you have to call ogl_LoadFunctions after glfwMakeContextCurrent function. On Linux it was ok calling ogl_LoadFunctions before context creation, though.

  6. Log in to comment