pixel
pixel copied to clipboard
creating window failed: VersionUnavailable: WGL: OpenGL profile requested but WGL_ARB_create_context_profile is unavailable
Hello,
My understanding of this error from a quick Google is that it means my graphics card and/or its drivers are outdated. (ie. not supporting above OpenGL 3.1)
Was keen to use this but if it wont run at all on slightly older machines makes it a non-starter.
Also worth noting that the Engo engine runs fine on this machine, looking at the imports... seems it's using "github.com/go-gl/glfw/v3.1/glfw".
Any plans to support older versions of OpenGL or similar?
System:
- Windows 10
- Intel Graphics HD 3000
Error from running platformer example:
panic: creating window failed: VersionUnavailable: WGL: OpenGL profile requested but WGL_ARB_create_context_profile is unavailable
goroutine 5 [running]:
main.run()
C:/GoProjects/src/github.com/faiface/pixel/examples/platformer/main.go:283 +0x12a0
github.com/faiface/mainthread.Run.func1(0x593040, 0xc04201a240)
C:/GoProjects/src/github.com/faiface/mainthread/mainthread.go:39 +0x2e
created by github.com/faiface/mainthread.Run
C:/GoProjects/src/github.com/faiface/mainthread/mainthread.go:41 +0xec
Hi!
So I've experimented a bit and tried using OpenGL 3.1 in glhf, which Pixel uses for OpenGL. The trouble is, that go-gl only supports gles2 in version 3.1, which lacks several important OpenGL functions which I use (such as glGetBufferSubData
or glGetTexImage
).
So, I'm sorry, but right now, I won't be able to use a lower version of OpenGL.
However, your graphics card is perfectly capable of doing OpenGL 3.3, it's just that Intel was lazy enough not to make proper drivers. But in Linux, everything should work from what I googled.
I'd also like to note, that except for Intel HD 2000 and Intel HD 3000 on Windows, pretty much all GPUs manufactured <10 years ago support OpenGL 3.3, so I don't think it's a very big deal or a non-starter.
And one more note, Engo actually uses OpenGL 2.1, which is even older and worse.
I guess ultimately my concern would be for users running old hardware not being able to play my game.
In what ways is OpenGL 2.1 older/worse? ie. what features / potential performance gains are lost?
Ok, so I was experimenting again and figured out, that even though OpenGL 2.1 lack several important features itself (such as vertex arrays), it supports numerous standard extensions that make it forward-compatible.
I've added the branch gl2.1
to Pixel and GLHF. Would you please switch to both of them (Pixel uses GLHF) and test whether it works on Intel HD 3000? In case it does, I'll consider including these changes.
Laptop is physically elsewhere at the moment, but should be able to get back to you in 2 or 3 days. Thanks!
@faiface FYI, looks like you haven't pushed up the gl2.1 branch code yet.
Correct, pushed now. Thanks.
Working without issues now! If there's any specific examples/ behaviour you want me to test, let me know.
Ok, cool. I would like you to also try switching the glhf
branch to master
, but leaving Pixel at gl2.1
. This will cause OpenGL imports to be 3.3
and thus not allowing to use non-modern OpenGL. Will you test this please?
Fails to run.
Platformer Example:
$ ./platformer.exe
panic: glGetBufferParameteri64v
goroutine 1 [running, locked to thread]:
github.com/faiface/glhf.Init()
C:/GoProjects/src/github.com/faiface/glhf/orphan.go:14 +0x79
github.com/faiface/pixel/pixelgl.(*Window).begin(0xc042092a80)
C:/GoProjects/src/github.com/faiface/pixel/pixelgl/window.go:340 +0x50
github.com/faiface/pixel/pixelgl.NewWindow.func1(0xc042039e60, 0x439c85)
C:/GoProjects/src/github.com/faiface/pixel/pixelgl/window.go:116 +0x1f3
github.com/faiface/mainthread.CallErr.func1()
C:/GoProjects/src/github.com/faiface/mainthread/mainthread.go:74 +0x2d
github.com/faiface/mainthread.Run(0x593038)
C:/GoProjects/src/github.com/faiface/mainthread/mainthread.go:46 +0x166
github.com/faiface/pixel/pixelgl.Run(0x593038)
C:/GoProjects/src/github.com/faiface/pixel/pixelgl/run.go:32 +0x65
main.main()
C:/GoProjects/src/github.com/faiface/pixel/examples/platformer/main.go:393 +0x34
Batch Example:
$ ./05_drawing_efficiently_with_batch.exe
panic: glGetBufferParameteri64v
goroutine 1 [running, locked to thread]:
github.com/faiface/glhf.Init()
C:/GoProjects/src/github.com/faiface/glhf/orphan.go:14 +0x79
github.com/faiface/pixel/pixelgl.(*Window).begin(0xc04208e000)
C:/GoProjects/src/github.com/faiface/pixel/pixelgl/window.go:340 +0x50
github.com/faiface/pixel/pixelgl.NewWindow.func1(0xc042039e60, 0x439c85)
C:/GoProjects/src/github.com/faiface/pixel/pixelgl/window.go:116 +0x1f3
github.com/faiface/mainthread.CallErr.func1()
C:/GoProjects/src/github.com/faiface/mainthread/mainthread.go:74 +0x2d
github.com/faiface/mainthread.Run(0x5851b8)
C:/GoProjects/src/github.com/faiface/mainthread/mainthread.go:46 +0x166
github.com/faiface/pixel/pixelgl.Run(0x5851b8)
C:/GoProjects/src/github.com/faiface/pixel/pixelgl/run.go:32 +0x65
main.main()
C:/GoProjects/src/github.com/faiface/pixel/examples/guide/05_drawing_efficiently_with_batch/main.go:109 +0x34
@faiface Pinging you on this one so it's not forgotten :)
@SilbinaryWolf Since the OpenGL 2.1 support proven to be non-problematic, I will merge it to the master when I have time. I've been quite busy recently, I expect to do it in 2 or 3 days. But thanks for reminding anyway :)
Yeah no worries. Thanks for your work on this, love the simplicity of this library :)
Ok, I just switched Pixel and GLHF to OpenGL 2.1. Sorry for the delay, I was really busy. Does it work for you?
But now it introduced an issue here #37, which seems to be related to this. I might need to revert this change, since it seems to be causing severe problems on OS X. I guess there are more OS X users than users of 10 years old GPUs.
Unfortunately, I had to switch back to OpenGL 3.3, because this doesn't seem to be able to work on OS X (sort of mixing new and old OpenGL). If I figure this out later, I'll let you know.