D3DX10_IMAGE_LOAD_INFO

D3DX10_IMAGE_LOAD_INFO structure

Optionally provide information to texture loader APIs to control how textures get loaded. A value of D3DX10_DEFAULT for any of these parameters will cause D3DX to automatically use the value from the source file.

Syntax


typedef struct D3DX10_IMAGE_LOAD_INFO {
  UINT              Width;
  UINT              Height;
  UINT              Depth;
  UINT              FirstMipLevel;
  UINT              MipLevels;
  D3D10_USAGE       Usage;
  UINT              BindFlags;
  UINT              CpuAccessFlags;
  UINT              MiscFlags;
  DXGI_FORMAT       Format;
  UINT              Filter;
  UINT              MipFilter;
  D3DX10_IMAGE_INFO *pSrcInfo;
} D3DX10_IMAGE_LOAD_INFO, *LPD3DX10_IMAGE_LOAD_INFO;

Members

Width

Type: UINT

The target width of the texture. If the actual width of the texture is larger or smaller than this value then the texture will be scaled up or down to fit this target width.

Height

Type: UINT

The target height of the texture. If the actual height of the texture is larger or smaller than this value then the texture will be scaled up or down to fit this target height.

Depth

Type: UINT

The depth of the texture. This only applies to volume textures.

FirstMipLevel

Type: UINT

The highest resolution mipmap level of the texture. If this is greater than 0, then after the texture is loaded FirstMipLevel will be mapped to mipmap level 0.

MipLevels

Type: UINT

The maximum number of mipmap levels that the texture will have. Using 0 or D3DX10_DEFAULT will cause a full mipmap chain to be created.

Usage

Type: D3D10_USAGE

The way the texture resource is intended to be used. See D3D10_USAGE.

BindFlags

Type: UINT

The pipeline stages that the texture will be allowed to bind to. See D3D10_BIND_FLAG.

CpuAccessFlags

Type: UINT

The access permissions the cpu will have for the texture resource. See D3D10_CPU_ACCESS_FLAG.

MiscFlags

Type: UINT

Miscellaneous resource properties (see D3D10_RESOURCE_MISC_FLAG).

Format

Type: DXGI_FORMAT

The format the texture will be in after it is loaded. See DXGI_FORMAT.

Filter

Type: UINT

Filter the texture using the specified filter (only when resampling). See D3DX10_FILTER_FLAG.

MipFilter

Type: UINT

Filter the texture mip levels using the specified filter (only if generating mipmaps). Valid values are D3DX10_FILTER_NONE, D3DX10_FILTER_POINT, D3DX10_FILTER_LINEAR, or D3DX10_FILTER_TRIANGLE. See D3DX10_FILTER_FLAG.

pSrcInfo

Type: D3DX10_IMAGE_INFO*

Information about the original image. See D3DX10_IMAGE_INFO. Can be obtained with D3DX10GetImageInfoFromFile, D3DX10GetImageInfoFromMemory, or D3DX10GetImageInfoFromResource.

Remarks

When initializing the structure, you may set any member to D3DX10_DEFAULT and D3DX will initialize it with a default value from the source texture when the texture is loaded.

This structure can be used by APIs that:

Requirements

Header

D3DX10Tex.h

See also

D3DX Structures

 

 

Show:
© 2016 Microsoft