gl
gl copied to clipboard
Fails on Raspberry Pi (go1.5 linux/arm).
go get github.com/goxjs/gl
github.com/goxjs/gl code/go/src/github.com/goxjs/gl/gl_opengles.go:24: ContextWatcher redeclared in this block previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:17 code/go/src/github.com/goxjs/gl/gl_opengles.go:26: contextWatcher redeclared in this block previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:19 code/go/src/github.com/goxjs/gl/gl_opengles.go:29: contextWatcher.OnDetach redeclared in this block previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:33 code/go/src/github.com/goxjs/gl/gl_opengles.go:31: ActiveTexture redeclared in this block previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:38 code/go/src/github.com/goxjs/gl/gl_opengles.go:35: AttachShader redeclared in this block previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:45 code/go/src/github.com/goxjs/gl/gl_opengles.go:39: BindAttribLocation redeclared in this block previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:53 code/go/src/github.com/goxjs/gl/gl_opengles.go:45: BindBuffer redeclared in this block previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:60 code/go/src/github.com/goxjs/gl/gl_opengles.go:49: BindFramebuffer redeclared in this block previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:67 code/go/src/github.com/goxjs/gl/gl_opengles.go:53: BindRenderbuffer redeclared in this block previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:74 code/go/src/github.com/goxjs/gl/gl_opengles.go:57: BindTexture redeclared in this block previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:81 code/go/src/github.com/goxjs/gl/gl_opengles.go:57: too many errors`
I just tested it, and I'm not seeing any problems with Go 1.5.1.
~ $ go get -u github.com/goxjs/gl
~ $
You should use -u flag to avoid stale dependencies causing trouble.
If that doesn't help, can you post more information about your system? What operating system, version? What does go version print? If you're on OS X, what version of Xcode or command line utilities do you have?
I’m using Go compiled from source on a raspberry pi.
go version output: go version go1.5 linux/arm
uname -a output: Linux raspberrypi 4.1.7-v7+ #817 SMP PREEMPT Sat Sep 19 15:32:00 BST 2015 armv7l GNU/Linux
From: Dmitri Shuralyov [mailto:[email protected]] Sent: Monday, 16 November 2015 2:27 p.m. To: goxjs/gl Cc: Carl Menezes Subject: Re: [gl] Go get fails on go 1.5 (#13)
I just tested it, and I'm not seeing any problems with Go 1.5.1.
~ $ go get -u github.com/goxjs/gl
~ $
You should use -u flag to avoid stale dependencies causing trouble.
If that doesn't help, can you post more information about your system? What operating system, version? What does go version print? If you're on OS X, what version of Xcode or command line utilities do you have?
— Reply to this email directly or view it on GitHubhttps://github.com/goxjs/gl/issues/13#issuecomment-156886074.
I see. Raspberry Pi is the problem, not Go 1.5.
I don't think Raspberry Pi is supported at this time. It only supports OpenGL ES, not OpenGL like most normal Linux systems.
It should be possible to get it to work, but it'll take some work.
What would you like to use this package for? Have you already explored and compared alternatives?
I have my pi hooked up to a capacitive touch screen and am putting together a prototype UI using gxui, which pulls in a few packages from goxjs.
From: Dmitri Shuralyov [mailto:[email protected]] Sent: Monday, 16 November 2015 2:37 p.m. To: goxjs/gl Cc: Carl Menezes Subject: Re: [gl] Fails on Raspberry Pi (go1.5 linux/arm). (#13)
I see. Raspberry Pi is the problem, not Go 1.5.
I don't think Raspberry Pi is supported at this time. It only supports OpenGL ES, not OpenGL like most normal Linux systems.
It should be possible to get it to work, but it'll take some work.
What would you like to use this package for? Have you already explored and compared alternatives?
— Reply to this email directly or view it on GitHubhttps://github.com/goxjs/gl/issues/13#issuecomment-156887162.
I see.
If you want gxui to work on Raspberry Pi, both this package and goxjs/glfw will need to support Raspberry Pi.
If another OpenGL bindings package supported Raspberry Pi, you could change gxui to use it for its rendering. However, I'm not aware of anything that supports Raspberry Pi. I haven't done the research though.
So the best way to make this work would be to add Raspberry Pi here, I think. Unless other people have better suggestions. Let me know if you're interested in doing this work; I can help with review.
Don't know anything about OpenGL ES so I won't volunteer just yet.
@carlTLR: could you solve your problem by any means? From what you know or read about goxjs/gl do you think it's worth to still put some effort in this project? Let me know why you think it's the perfect solution for the Pi and I will take a look into.
I don't know goxjs/gl yet nor do I know OpenGL ES, but I have successfully ported or simply cross-compiled some projects to Raspian Jessie for the Raspberry Pi 2 Model B (ARMv7) inclusive Go 1.6 (standard binary download is ARMv6).
I could probably help to solve the issue, but I will only spend some time into this project if I can see a gain for the Raspberry Pi / Go community. I'm more interested in golang.org/x/mobile/gl.
Thanks for your potential interest here @petergloor.
I'll share about a relevant development since this issue was last updated. By now, there exist generated bindings for OpenGL ES in the go-gl/gl repo:
https://godoc.org/github.com/go-gl/gl/v3.1/gles2
They are bindings for OpenGL ES 3.1. I am not sure what version of OpenGL ES the Raspberry Pis support, but it might be a lower version. Still, it's possible to generate lower versions of OpenGL ES bindings via glow. See https://github.com/go-gl/gl/commit/d8e753c9b3953285d8ea142ca4e5dfea03ee760e for example.
The OpenGL ES bindings are a part of the equation, you'd still need GLFW support for Raspberry Pi, or something else that can create a window, OpenGL ES context, and take care of input, etc.
Hi, I have same problem with go version 1.6 linux arm on my Raspberry Pi. I'd love to be able to use gxui on raspberry, it seems to be the best solution for my purposses. I don't know anything about OpenGL ES, but I can help with testing.
Hi @Drahoslav7,
I'd love to be able to use gxui on raspberry
Unfortunately, that is not currently implemented. I'm not actively working on this because it's not a priority for me (and I don't have a Raspberry Pi), and I know the gxui project is not actively developed anymore either. I just want to help set your expectations right. Getting this issue resolved will require some work and testing, but I don't know of anyone actively working on this at this time, unfortunately.
Hi Peter,
No, I had other projects on my plate, so I proceeded with a platform that it worked with. I think it is worth putting some effort into it because it enables a UI that looks the same on all platforms, but at a slightly higher level.
It would use OpenGL ES to do the heavy lifting anyway, so I think it would fit nicely with the work you’re doing on golang.org/x/mobile/gl. Cheers, Carl
From: Peter Gloor [mailto:[email protected]] Sent: Thursday, 10 March 2016 3:00 a.m. To: goxjs/gl Cc: Carl Menezes Subject: Re: [gl] Fails on Raspberry Pi (go1.5 linux/arm). (#13)
@carlTLRhttps://github.com/carlTLR: could you solve your problem by any means? From what you know or read about goxjs/gl do you think it's worth to still put some effort in this project? Let me know why you think it's the perfect solution for the Pi and I will take a look into.
I don't know goxjs/gl yet nor do I know OpenGL ES, but I have successfully ported or simply cross-compiled some projects to Raspian Jessie for the Raspberry Pi 2 Model B (ARMv7) inclusive Go 1.6 (standard binary download is ARMv6).
I could probably help to solve the issue, but I will only spend some time into this project if I can see a gain for the Raspberry Pi / Go community. I'm more interested in golang.org/x/mobile/gl.
— Reply to this email directly or view it on GitHubhttps://github.com/goxjs/gl/issues/13#issuecomment-194308023.