SDL_GPUTextureCreateInfo Struct Reference

`#include <SDL_gpu.h>`

## Data Fields

SDL_GPUTextureType | type
SDL_GPUTextureFormat | format
SDL_GPUTextureUsageFlags | usage
Uint32 | width
Uint32 | height
Uint32 | layer_count_or_depth
Uint32 | num_levels
SDL_GPUSampleCount | sample_count
SDL_PropertiesID | props

## Detailed Description

A structure specifying the parameters of a texture.

Usage flags can be bitwise OR'd together for combinations of usages. Note that certain usage combinations are invalid, for example SAMPLER and GRAPHICS_STORAGE.

Since
  This struct is available since SDL 3.2.0.

See also
  SDL_CreateGPUTexture
  SDL_GPUTextureType
  SDL_GPUTextureFormat
  SDL_GPUTextureUsageFlags
  SDL_GPUSampleCount

Definition at line 1770 of file SDL_gpu.h.

## Field Documentation

## format

SDL_GPUTextureFormat SDL_GPUTextureCreateInfo::format

The pixel format of the texture.

Definition at line 1773 of file SDL_gpu.h.

## height

Uint32 SDL_GPUTextureCreateInfo::height

The height of the texture.

Definition at line 1776 of file SDL_gpu.h.

## layer_count_or_depth

Uint32 SDL_GPUTextureCreateInfo::layer_count_or_depth

The layer count or depth of the texture. This value is treated as a layer count on 2D array textures, and as a depth value on 3D textures.

Definition at line 1777 of file SDL_gpu.h.

## num_levels

Uint32 SDL_GPUTextureCreateInfo::num_levels

The number of mip levels in the texture.

Definition at line 1778 of file SDL_gpu.h.

## props

SDL_PropertiesID SDL_GPUTextureCreateInfo::props

A properties ID for extensions. Should be 0 if no extensions are needed.

Definition at line 1781 of file SDL_gpu.h.

## sample_count

SDL_GPUSampleCount SDL_GPUTextureCreateInfo::sample_count

The number of samples per texel. Only applies if the texture is used as a render target.

Definition at line 1779 of file SDL_gpu.h.

## type

SDL_GPUTextureType SDL_GPUTextureCreateInfo::type

The base dimensionality of the texture.

Definition at line 1772 of file SDL_gpu.h.

## usage

SDL_GPUTextureUsageFlags SDL_GPUTextureCreateInfo::usage

How the texture is intended to be used by the client.

Definition at line 1774 of file SDL_gpu.h.

## width

Uint32 SDL_GPUTextureCreateInfo::width

The width of the texture.

Definition at line 1775 of file SDL_gpu.h.

The documentation for this struct was generated from the following file:

- SDL_gpu.h