forked from mikeseven/node-webgl
-
Notifications
You must be signed in to change notification settings - Fork 178
Open
Description
texImage2D(target, level, internalformat, width, height, border, format, type, pixels)wantspixelsas UInt8Array.texImage2D(target, level, internalformat, format, type, pixels)wantspixelsas ImageData.
For example:
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, image.width, image.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, image.data);
I think the second variant of texImage2D should accept ImageData too.
Metadata
Metadata
Assignees
Labels
No labels