D3DX10_SPRITE structure

Defines position, texture, and color information about a sprite.

Syntax

typedef struct D3DX10_SPRITE {
  D3DXMATRIX               matWorld;
  D3DXVECTOR2              TexCoord;
  D3DXVECTOR2              TexSize;
  D3DXCOLOR                ColorModulate;
  ID3D10ShaderResourceView *pTexture;
  UINT                     TextureIndex;
} D3DX10_SPRITE;

Members

matWorld

Type: D3DXMATRIX

The sprite's model-world transformation. This defines the position and orientation of the sprite in world space.

TexCoord

Type: D3DXVECTOR2

Offset from the upper-left corner of the texture indicating where the sprite image should start in the texture. TexCoord is in texture coordinates.

TexSize

Type: D3DXVECTOR2

A vector containing the width and height of the sprite in texture coordinates.

ColorModulate

Type: D3DXCOLOR

A color that will be multiplied with the pixel color before rendering.

pTexture

Type: ID3D10ShaderResourceView*

Pointer to a shader-resource view representing the sprite's texture. See ID3D10ShaderResourceView Interface.

TextureIndex

Type: UINT

The index of the texture. If pTexture does not represent a texture array, then this should be 0.

Requirements

Requirement Value
Header
D3DX10.h

See also

D3DX Structures