go-gl / gl

Go bindings for OpenGL (generated via glow)
MIT License
1.06k stars 72 forks source link

Init doesnt load glActiveTexture #152

Open tod91 opened 2 years ago

tod91 commented 2 years ago

Hello

I'm trying to run a project on windows 10 but when I get to gl.Init() internally InitWithProcAddrFunc fails on the line where:

    gpActiveTexture = (C.GPACTIVETEXTURE)(getProcAddr("glActiveTexture"))
    if gpActiveTexture == nil {
        return errors.New("glActiveTexture")
    }

I have 4.6 opengl drivers and am using Intel(R) UHD Graphics 630 card. Any ideas why this could be occuring, Thanks!

tod91 commented 2 years ago

As additional information i tried it with version 3.0 to 4.6, when we go from > 3.3 glActiveTexture is loaded but glActiveShaderProgram fails.

dmitshur commented 2 years ago

One simple thing to check first is that you’re calling gl.Init after creating an OpenGL context and making it current (e.g., MakeContextCurrent) as mentioned in the README.