Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to create Canvas, there's a bug in the shader #37

Closed
objque opened this issue Jun 9, 2017 · 9 comments
Closed

failed to create Canvas, there's a bug in the shader #37

objque opened this issue Jun 9, 2017 · 9 comments
Labels

Comments

@objque
Copy link

objque commented Jun 9, 2017

I've just tried to compile platform/smoke examples and saw an error
panic: failed to create Canvas, there's a bug in the shader: error compiling vertex shader: ERROR: 0:2: '' : version '130' is not supported

stacktrace

goroutine 1 [running, locked to thread]:
github.com/faiface/pixel/pixelgl.NewCanvas.func1()
	/Users/me/go/src/github.com/faiface/pixel/pixelgl/canvas.go:52 +0x138
github.com/faiface/mainthread.Call.func1()
	/Users/me/go/src/github.com/faiface/mainthread/mainthread.go:64 +0x26
github.com/faiface/mainthread.Run(0x423a320)
	/Users/me/go/src/github.com/faiface/mainthread/mainthread.go:46 +0x15f
github.com/faiface/pixel/pixelgl.Run(0x423a320)
	/Users/me/go/src/github.com/faiface/pixel/pixelgl/run.go:32 +0x5e
main.main()
	/Users/me/go/src/github.com/faiface/pixel/examples/platformer/main.go:393 +0x2d

go version
go version go1.8.3 darwin/amd64

os: macOS

what i'm doing wrong? i don't edit anything

@faiface
Copy link
Owner

faiface commented Jun 9, 2017

This is not your fault, it's just that your OpenGL driver for some reason doesn't support OpenGL shader language version 130. Is this the first time you're running Pixel?

@objque
Copy link
Author

objque commented Jun 9, 2017

Yep, clone this lib 5 minutes ago

@faiface
Copy link
Owner

faiface commented Jun 9, 2017

@objque The panic message you got is all you got? When I run Pixel with a weird GLSL version it also tells me which GLSL versions are supported.

@faiface
Copy link
Owner

faiface commented Jun 9, 2017

Try switching to the version before I switched to OpenGL 2.1 (from 3.3) like this:

$ cd $GOPATH/src/github.com/faiface/pixel
$ git checkout tags/v0.6

This will undo recent commits and get you to version 0.6. I think this should help right now.

@faiface faiface added the bug label Jun 9, 2017
@objque
Copy link
Author

objque commented Jun 10, 2017

Yea, only the panic msg.
I've switched to 0.6 and smoke/platformer works!

@faiface
Copy link
Owner

faiface commented Jun 10, 2017

Now it should be OK in the latest version too. Does it work with the latest commits?

@objque
Copy link
Author

objque commented Jun 10, 2017

Yea, it's works with latest commits. Smoke has builded.
Issue may be closed.

@faiface
Copy link
Owner

faiface commented Jun 10, 2017

Cool!

@faiface faiface closed this as completed Jun 10, 2017
@peterhellberg
Copy link
Contributor

peterhellberg commented Jun 12, 2017

Another data point: I had this exact issue when running a binary (compiled under Sierra, before you fixed this issue) on a machine having El Capitan installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants