Skip to content

Latest commit

 

History

History
133 lines (83 loc) · 1.83 KB

sm5-object-texture2d-getdimensions.md

File metadata and controls

133 lines (83 loc) · 1.83 KB
title description ms.assetid keywords topic_type api_name api_type ms.topic ms.date api_location
Texture2D::GetDimensions function
Returns the dimensions of the resource. | Texture2D::GetDimensions function
921e425d-c0dd-4b8d-b590-0599fabfe606
GetDimensions function HLSL
apiref
GetDimensions
NA
reference
05/31/2018

Texture2D::GetDimensions function

Returns the dimensions of the resource.

Syntax

void GetDimensions(
  in  
            uint MipLevel,
  out 
            uint Width,
  out uint Height,
  out 
            uint NumberOfLevels
);

Parameters

MipLevel [in]

Type: uint

Optional. The mipmap level (must be specified if NumberOfLevels is used).

Width [out]

Type: uint

The resource width, in texels.

Height [out]

Type: uint

The resource height, in texels.

NumberOfLevels [out]

Type: uint

The number of mipmap levels (requires MipLevel also).

Return value

Nothing

Remarks

This is a list of the overloaded versions of this method.

void GetDimensions(uint MipLevel, 
  out uint Width,
  out uint Height,
  out uint NumberOfLevels);

void GetDimensions (out uint Width,
  out uint Height);

void GetDimensions(uint MipLevel,
  out float Width,
  out float Height,
  out float NumberOfLevels);

void GetDimensions(out float Width,
  out float Height);

This function is supported for the following types of shaders:

Vertex Hull Domain Geometry Pixel Compute
x x

 

See also

Texture2D

Shader Model 5