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/texImage3D below:

WebGL2RenderingContext: texImage3D() method - Web APIs

WebGL2RenderingContext: texImage3D() method

Baseline Widely available *

Note: This feature is available in Web Workers.

The WebGLRenderingContext.texImage3D() method of the WebGL API specifies a three-dimensional texture image.

Syntax
texImage3D(target, level, internalformat, width, height, depth, border, format, type, offset)
texImage3D(target, level, internalformat, width, height, depth, border, format, type, source)
texImage3D(target, level, internalformat, width, height, depth, border, format, type, srcData)
texImage3D(target, level, internalformat, width, height, depth, border, 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.

internalformat

A GLint specifying the color components in the texture. Possible values:

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.

border

A GLint specifying the width of the border. Must be 0.

format

A GLenum specifying the format of the texel data. The correct combinations with internalformat are listed in this table.

type

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

source

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.texImage3D(
  gl.TEXTURE_3D,
  0, // level
  gl.RGBA, // internalFormat
  1, // width
  1, // height
  1, // depth
  0, // border
  gl.RGBA, // format
  gl.UNSIGNED_BYTE, // type
  new Uint8Array([0xff, 0x00, 0x00, 0x00]),
); // data
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