webgl
webgl copied to clipboard
Gopherjs binding to the webgl context
Hi, first of all I don't expect this to get merged already! This PR adds wasm support via `github.com/gopherjs/gopherwasm/js` to this package but js via gopherjs should also still work....
Could you add more example or may I create a PR with examples?
Fix #13
Want constructor for javascript Image. I am currently using this work-around: ``` func newImage() *js.Object { return js.Global.Call("eval", "(new Image())") } image := newImage() image.Set("onload", func() { //go onLoad(gl, t,...
Want: gl.TexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, rbga) Current work-around: gl.Call("texImage2D", gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, rgba) rgba type is []byte
There are methods such as GetShaderParameter() returning the actual result, but for program parameter, only type specific methods exist. In my case of wrapping WebGL behind a OpenGL ES generic...
The matrix parameters of the *v functions are parameter lists, both according to OpenGL ES 2 and the WebGL specification. The current signature of the wrapper specifies only one slice....