You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
1.7
What operating system and processor architecture are you using (go env)?
mac os
What did you do?
migrate a program from pc to mobile
go get -u github.com/go-gl/glfw/v3.2/glfw --> golang.org/x/mobile/app
go get -u github.com/go-gl/gl/v2.1/gl --> golang.org/x/mobile/gl
go get -u github.com/timshannon/go-openal/openal --> golang.org/x/mobile/exp/audio/al
I wish to do the above change
What did you expect to see?
[golang.org/x/mobile/gl] act just like [github.com/go-gl/gl/v2.1/gl ]
The name of the package might be misleading, 'golang.org/x/mobile/gl' is built upon OpenGL ES 2.0 (w/ optional support for OpenGL 3.0) not the "desktop" OpenGL. OpenGL ES 2.0 dropped the support for the fixed pipeline so porting your code will a bit harder.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.7
What operating system and processor architecture are you using (
go env
)?mac os
What did you do?
migrate a program from pc to mobile
go get -u github.com/go-gl/glfw/v3.2/glfw --> golang.org/x/mobile/app
go get -u github.com/go-gl/gl/v2.1/gl --> golang.org/x/mobile/gl
go get -u github.com/timshannon/go-openal/openal --> golang.org/x/mobile/exp/audio/al
I wish to do the above change
What did you expect to see?
[golang.org/x/mobile/gl] act just like [github.com/go-gl/gl/v2.1/gl ]
What did you see instead?
There is lot of differences ,
//not implemented
gl.TexImage1D
gl.Begin(gl.TRIANGLE_STRIP)
gl.End()
gl.PushMatrix()
gl.PopMatrix()
gl.MatrixMode(gl.PROJECTION)
gl.TexCoord2f(1, 1)
gl.Vertex2f(x2, y2)
gl.Color4f(r, g, b, a)
gl.LoadIdentity()
gl.Ortho(0, float64(sys.scrrect[2]), 0, float64(sys.scrrect[3]), -1, 1)
gl.Translated(0, float64(sys.scrrect[3]), 0)
//interface/behaviour change
gl.GenTextures(1, &paltex) -->CreateTexture
gl.DeleteTextures(1, &paltex) --> DeleteTexture
//unclear
gl.Str(src) -->GetString(pname Enum) string ???
gl.DeleteObjectARB(fragObj) --> DeleteShader ????
gl.GetInfoLogARB -->GetProgramInfoLog| GetShaderInfoLog ????
The text was updated successfully, but these errors were encountered: