webgl
webgl copied to clipboard
Wishlist: binding for byte-slice aware gl.texImage2D
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
This is a valid enhancement request.
I've already implemented this in github.com/goxjs/gl package, see here.
It's also implemented in github.com/shurcooL/gogl package, see this commit and its discussion, but that gogl package is now deprecated and should not be used.