wglGetProcAddress not able to load EXT APIs

I am trying to load GL EXT APIs through wglGetProcAddress. I saw several posts that said this is not possible for OpenGL 1.1. I printed out my version using glGetString(GL_VERSION) and my OpenGL version is 4.6.0. This system is Win 10 with build - 18362

I am able to run the same code - wglGetProcAddress with the same OpenGL version and driver on another Windows machine - Win 10 with build -19044.

Does this mean the problem is with the WIndows build version? Does it change?

What are your GL_VERSION, GL_RENDERER, and GL_VENDOR strings.

See what this tells you about driver support, including extensions:

Thanks for replying. I just checked GL_VERSION, GL_RENDERED and GL_VENDOR strings. It is the same

It’s possible your GPU driver just doesn’t export the -EXT APIs you’re trying to load. This is dependent on the GPU and device driver, not the OS, and it’s perfectly legal for a conformant GL implementation.

Thanks for replying. Okay I will check that.

Might you have any idea about why there is an illegal access exception thrown when accessing glewInit()? I have tried adding glewExperimental = GL_TRUE but the exception still remains?

You most likely are trying to initialize GLEW before creating your context. All that glewExperimental does is relax strict correctness of extension checking, so implementations that don’t correctly implement extensions can still partially use them, at own risk. It’s not magic voodoo to make things work.