webgl icon indicating copy to clipboard operation
webgl copied to clipboard

Wishlist: binding for byte-slice aware gl.texImage2D

Open udhos opened this issue 10 years ago • 1 comments

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

udhos avatar Jun 08 '15 17:06 udhos

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.

dmitshur avatar Jun 09 '15 08:06 dmitshur