Light | Dark

textureSize

Name

textureSize — retrieve the dimensions of a level of a texture

Declaration

ivec2 textureSize( gsampler2D sampler,
int lod);
ivec3 textureSize( gsampler3D sampler,
int lod);
ivec2 textureSize( gsamplerCube sampler,
int lod);
ivec2 textureSize( sampler2DShadow sampler,
int lod);
ivec2 textureSize( samplerCubeShadow sampler,
int lod);
ivec3 textureSize( gsampler2DArray sampler,
int lod);
ivec3 textureSize( sampler2DArrayShadow sampler,
int lod);

Parameters

sampler

Specifies the sampler to which the texture whose dimensions to retrieve is bound.

lod

Specifies the level of the texture for which to retrieve the dimensions.

Description

textureSize returns the dimensions of level lod (if present) of the texture bound to sampler. The components in the return value are filled in, in order, with the width, height and depth of the texture. For the array forms, the last component of the return value is the number of layers in the texture array. The return values are returned as highp ints.

Version Support

OpenGL ES Shading Language Version
Function Name 1.00 3.00 3.10
textureSize -
Think you can improve this page? Edit this page on GitHub.