Share via


GetDimensions (objeto de textura HLSL do DirectX)

Obtém informações de tamanho da textura. O bloco de sintaxe mostra todos os parâmetros possíveis na declaração de método. A tabela na seção Comentários mostra quais parâmetros são implementados para cada tipo de objeto de textura.

void Object.GetDimensions( UINT MipLevel, typeX Width, typeX Height, typeX Elements, typeX Depth, typeX NumberOfLevels, typeX NumberOfSamples );

TypeX indica que há dois tipos possíveis: uint ou float.

Parâmetros

Item Descrição
Objeto
Qualquer tipo de objeto de textura , exceto um objeto Buffer .
MipLevel
[in] Um índice baseado em zero que identifica o nível de mipmap. Se esse argumento não for usado, o primeiro nível de mip será assumido.
Largura
[out] A largura da textura, em texels.
Altura
[out] A altura da textura, em texels.
Elementos
[out] O número de elementos em uma matriz.
Profundidade
[out] A profundidade da textura, em texels.
NumberOfLevels
[out] O número de níveis de mipmap.
NumberOfSamples
[out] O número de amostras.

Valor Retornado

Nenhum

Métodos sobrecarregados

Esta tabela lista todas as diferentes versões do método; as versões diferem pelo número de parâmetros de entrada. Observe que, para cada método que usa parâmetros inteiros, há um método sobrecarregado que usa parâmetros de ponto flutuante.

Tipo de Texture-Object Parâmetros de Entrada
Texture1D UINT MipLevel, Largura UINT, UINT NumberOfLevels
Texture1D Largura UINT
Texture1D UINT MipLevel, float Width, float NumberOfLevels
Texture1D Float Width
Texture1DArray UINT MipLevel, Largura UINT, Elementos UINT, UINT NumberOfLevels
Texture1DArray Largura UINT, elementos UINT
Texture1DArray UINT MipLevel, float Width, float Elements, float NumberOfLevels
Texture1DArray Float Width, float Elements
Texture2D UINT MipLevel, Largura UINT, Altura UINT, UINT NumberOfLevels
Texture2D Largura UINT, Altura UINT
Texture2D UINT MipLevel, float Width, float Height, float NumberOfLevels
Texture2D float Width, float Height
Texture2DArray UINT MipLevel, Largura UINT, Altura UINT, Elementos UINT, UINT NumberOfLevels
Texture2DArray Largura UINT, Altura UINT, Elementos UINT
Texture2DArray UINT MipLevel, float Width, float Height, float Elements, float NumberOfLevels
Texture2DArray Float Width, float Height, float Elements
Texture3D UINT MipLevel, Largura UINT, Altura UINT, Profundidade UINT, UINT NumberOfLevels
Texture3D Largura UINT, Altura UINT, Profundidade UINT
Texture3D UINT MipLevel, float Width, float Height, float Depth, float NumberOfLevels
Texture3D float Width, float Height, float Depth
TextureCube UINT MipLevel, Largura UINT, Altura UINT, UINT NumberOfLevels
TextureCube Largura UINT, Altura UINT
TextureCube UINT MipLevel, float Width, float Height, UINT NumberOfLevels
TextureCube float Width, float Height
TextureCubeArray UINT MipLevel, Largura UINT, Altura UINT, Elementos UINT, UINT NumberOfLevels
TextureCubeArray Largura UINT, Altura UINT, Elementos UINT
TextureCubeArray UINT MipLevel, float Width, float Height, float Elements, float NumberOfLevels
TextureCubeArray Float Width, float Height, float Elements
Texture2DMS Largura UINT, Altura UINT, Exemplos de UINT
Texture2DMS Float Width, float Height, float Samples
Texture2DMSArray Largura UINT, Altura UINT, Elementos UINT, Exemplos UINT
Texture2DMSArray float Width, float Height, float Elements, float Samples

Modelo de sombreador mínimo

Essa função tem suporte nos modelos de sombreador a seguir.

vs_4_0 vs_4_1 ps_4_0 ps_4_1 gs_4_0 gs_4_1
x x x x x x
  1. Retorna dimensões para o maior (zero) nível de mipmap.
  2. TextureCubeArray está disponível no Modelo de Sombreador 4.1 ou superior.
  3. O Modelo de Sombreador 4.1 está disponível no Direct3D 10.1 ou superior.

Objeto Texture