A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/texSubImage3D below:

WebGL2RenderingContext: texSubImage3D() method - Web APIs

WebGL2RenderingContext: texSubImage3D() method

Baseline Widely available *

Note: This feature is available in Web Workers.

The WebGL2RenderingContext.texSubImage3D() method of the WebGL API specifies a sub-rectangle of the current texture.

Syntax
texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels)
texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, offset)
texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData)
texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData, srcOffset)
Parameters
target

A GLenum specifying the binding point (target) of the active texture. Possible values:

level

A GLint specifying the level of detail. Level 0 is the base image level and level n is the n-th mipmap reduction level.

xoffset

A GLint specifying the x offset within the texture image.

yoffset

A GLint specifying the y offset within the texture image.

zoffset

A GLint specifying the z offset within the texture image.

width

A GLsizei specifying the width of the texture.

height

A GLsizei specifying the height of the texture.

depth

A GLsizei specifying the depth of the texture.

format

A GLenum specifying the format of the texel data. Possible values:

type

A GLenum specifying the data type of the texel data. Possible values:

pixels

One of the following objects can be used as a pixel source for the texture:

srcData

A TypedArray or a DataView object.

offset

A GLintptr byte offset into the WebGLBuffer's data store. Used to upload data to the currently bound WebGLTexture from the WebGLBuffer bound to the PIXEL_UNPACK_BUFFER target.

Return value

None (undefined).

Examples
gl.texSubImage3D(
  gl.TEXTURE_3D,
  0,
  0,
  0,
  0,
  image.width,
  image.height,
  1,
  gl.RGBA,
  gl.UNSIGNED_BYTE,
  image,
);
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3