Skip to content

Inconsistency between texImage2D variants #293

Open
@Azq2

Description

@Azq2
  1. texImage2D(target, level, internalformat, width, height, border, format, type, pixels) wants pixels as UInt8Array.
  2. texImage2D(target, level, internalformat, format, type, pixels) wants pixels as 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions