go-gl / gl

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

"panic: APIUnavailable: WGL: The driver does not appear to support OpenGL" #91

Closed coreyog closed 6 years ago

coreyog commented 6 years ago

I've successfully worked with go-gl before on this computer. I recently had some hardware issues and installed a new motherboard, processor, and RAM but am using the same Nvidia Geforce 970 as before. I have a fresh install of Windows 10 x64 Pro with mingw64 installed. I can run go get -u github.com\go-gl\example\gl21-cube and it will properly download and build without any problems however when I run the binary I get:

panic: APIUnavailable: WGL: The driver does not appear to support OpenGL

goroutine 1 [running, locked to thread]:
main.main()
        E:/git/goprojects/src/github.com/go-gl/example/gl21-cube/cube.go:43 +0x263
exit status 2

It's probably a missing dependency somewhere. I have the latest driver I can find which is 390.77. I know the hardware supports OpenGL and has even run go-gl programs before I reinstalled Windows. What am I missing to make this work again?

dmitshur commented 6 years ago

I won't be able to help much because I don't use Windows actively, but I suspect this could be some misconfiguration of mingw64. E.g., see https://stackoverflow.com/questions/39600073/glfw-wgl-the-driver-does-not-appear-to-support-opengl-error-when-creating-wi.

coreyog commented 6 years ago

I've reinstalled mingw-w64 several times specifying different versions and nothing is changing. I also don't have msys2 installed and it sounds like I don't need it.

coreyog commented 6 years ago

It probably doesn't help much but for the record the same behavior is exhibited for example/gl41core-cube as well as a simple pixel test project which uses go-gl. All give the same APIUnavailable error.

dmitshur commented 6 years ago

You can try running the GLFW (C library) examples and see if you get the same error there. That would tell us whether it's a go-gl issue or not.

See http://www.glfw.org/docs/latest/compile.html.

coreyog commented 6 years ago

Well... crap. I think it wasn't working earlier because I was connecting to my at-home tower over RDP. I got home to try building your glfw examples and re-ran your cube code again just in case and it worked. Spinning textured cube as expected. I really appreciate your effort though. Sorry it turned out to be nothing.

dmitshur commented 6 years ago

No worries, glad it's working. Enjoy! :)