EN
이 콘텐츠는 한국어로 제공되지 않아 영어 버전으로 표시됩니다.

generateMipmap method

Creates a set of textures for a WebGLTexture object with image dimensions from the original size of the image down to a 1x1 image.

IE11

 

Syntax

WebGLRenderingContext.generateMipmap(target);

Parameters

target [in]

Type: Number

The texture target of the active texture unit.

gl.TEXTURE_2D
gl.TEXTURE_CUBE_MAP

Return value

This method does not return a value.

Remarks

WebGL errorDescription
gl.INVALID_ENUMtarget isn't specified as gl.TEXTURE_2D or gl.TEXTURE_CUBE_MAP.
gl.INVALID_OPERATION
  • If the width or height of the zero level (original texture) array is not a power of two.

 

A mipmap is used to simulate distance with objects. A high-resolution mipmap image is used for objects that are close to the user. Lower-resolution images are used as the object appears farther away. Using mipmaps improves the quality of rendered textures at the expense of using more memory.

The internal format of a mipmap array is the same as the zero level texture image. Each level is half the resolution of the previous level, until a 1x1 dimension texture image is created.

See also

WebGLRenderingContext

 

 

표시:
© 2015 Microsoft