Export (0) Print
Expand All

GetDimensions (DirectX HLSL Texture Object)

Gets texture size information. The syntax block shows all the parameters that are possible in the method declaration. The table in the Remarks section shows which parameters are implemented for each texture-object type.

void Object.GetDimensions(

UINT MipLevel,

typeX Width,

typeX Height,

typeX Elements,

typeX Depth,

typeX NumberOfLevels,

typeX NumberOfSamples

);

 

typeX denotes that there are two possible types: uint or float.

Parameters

ItemDescription

Object

Any texture-object type except a Buffer object.

MipLevel

[in] A zero-based index that identifies the mipmap level. If this argument is not used, the first mip level is assumed.

Width

[out] The texture width, in texels.

Height

[out] The texture height, in texels.

Elements

[out] The number of elements in an array.

Depth

[out] The texture depth, in texels.

NumberOfLevels

[out] The number of mipmap levels.

NumberOfSamples

[out] The number of samples.

 

Return Value

None

Overloaded Methods

This table lists all the different versions of the method; versions differs by the number of input parameters. Notice that for every method that takes integer parameters, there is an overloaded method that takes floating-point parameters.

Texture-Object TypeInput Parameters
Texture1DUINT MipLevel, UINT Width, UINT NumberOfLevels
Texture1D1UINT Width
Texture1DUINT MipLevel, float Width, float NumberOfLevels
Texture1D1float Width
Texture1DArrayUINT MipLevel, UINT Width, UINT Elements, UINT NumberOfLevels
Texture1DArray1UINT Width, UINT Elements
Texture1DArrayUINT MipLevel, float Width, float Elements, float NumberOfLevels
Texture1DArray1float Width, float Elements
Texture2DUINT MipLevel, UINT Width, UINT Height, UINT NumberOfLevels
Texture2D1UINT Width, UINT Height
Texture2DUINT MipLevel, float Width, float Height, float NumberOfLevels
Texture2D1float Width, float Height
Texture2DArrayUINT MipLevel, UINT Width, UINT Height, UINT Elements, UINT NumberOfLevels
Texture2DArray1UINT Width, UINT Height, UINT Elements
Texture2DArrayUINT MipLevel, float Width, float Height, float Elements, float NumberOfLevels
Texture2DArray1float Width, float Height, float Elements
Texture3DUINT MipLevel, UINT Width, UINT Height, UINT Depth, UINT NumberOfLevels
Texture3D1UINT Width, UINT Height, UINT Depth
Texture3DUINT MipLevel, float Width, float Height, float Depth, float NumberOfLevels
Texture3D1float Width, float Height, float Depth
TextureCubeUINT MipLevel, UINT Width, UINT Height, UINT NumberOfLevels
TextureCube1UINT Width, UINT Height
TextureCubeUINT MipLevel, float Width, float Height, UINT NumberOfLevels
TextureCube1float Width, float Height
TextureCubeArray2UINT MipLevel, UINT Width, UINT Height, UINT Elements, UINT NumberOfLevels
TextureCubeArray 12UINT Width, UINT Height, UINT Elements
TextureCubeArray2UINT MipLevel, float Width, float Height, float Elements, float NumberOfLevels
TextureCubeArray12float Width, float Height, float Elements
Texture2DMS1UINT Width, UINT Height, UINT Samples
Texture2DMS1float Width, float Height, float Samples
Texture2DMSArray1UINT Width, UINT Height, UINT Elements, UINT Samples
Texture2DMSArray1float Width, float Height, float Elements, float Samples

 

Minimum Shader Model

This function is supported in the following shader models.

vs_4_0vs_4_13ps_4_0ps_4_13gs_4_0gs_4_13
xxxxxx

 

  1. Returns dimensions for the largest (zeroth) mipmap level.
  2. TextureCubeArray is available in Shader Model 4.1 or higher.
  3. Shader Model 4.1 is available in Direct3D 10.1 or higher.

Related topics

Texture-Object

 

 

Community Additions

ADD
Show:
© 2014 Microsoft