SDL_GPUShaderCreateInfo Struct Reference

`#include <SDL_gpu.h>`

## Data Fields

size_t | code_size
const Uint8 * | code
const char * | entrypoint
SDL_GPUShaderFormat | format
SDL_GPUShaderStage | stage
Uint32 | num_samplers
Uint32 | num_storage_textures
Uint32 | num_storage_buffers
Uint32 | num_uniform_buffers
SDL_PropertiesID | props

## Detailed Description

A structure specifying code and metadata for creating a shader object.

Since
  This struct is available since SDL 3.2.0.

See also
  SDL_CreateGPUShader

Definition at line 1640 of file SDL_gpu.h.

## Field Documentation

## code

const Uint8* SDL_GPUShaderCreateInfo::code

A pointer to shader code.

Definition at line 1643 of file SDL_gpu.h.

## code_size

size_t SDL_GPUShaderCreateInfo::code_size

The size in bytes of the code pointed to.

Definition at line 1642 of file SDL_gpu.h.

## entrypoint

const char* SDL_GPUShaderCreateInfo::entrypoint

A pointer to a null-terminated UTF-8 string specifying the entry point function name for the shader.

Definition at line 1644 of file SDL_gpu.h.

## format

SDL_GPUShaderFormat SDL_GPUShaderCreateInfo::format

The format of the shader code.

Definition at line 1645 of file SDL_gpu.h.

## num_samplers

Uint32 SDL_GPUShaderCreateInfo::num_samplers

The number of samplers defined in the shader.

Definition at line 1647 of file SDL_gpu.h.

## num_storage_buffers

Uint32 SDL_GPUShaderCreateInfo::num_storage_buffers

The number of storage buffers defined in the shader.

Definition at line 1649 of file SDL_gpu.h.

## num_storage_textures

Uint32 SDL_GPUShaderCreateInfo::num_storage_textures

The number of storage textures defined in the shader.

Definition at line 1648 of file SDL_gpu.h.

## num_uniform_buffers

Uint32 SDL_GPUShaderCreateInfo::num_uniform_buffers

The number of uniform buffers defined in the shader.

Definition at line 1650 of file SDL_gpu.h.

## props

SDL_PropertiesID SDL_GPUShaderCreateInfo::props

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

Definition at line 1652 of file SDL_gpu.h.

## stage

SDL_GPUShaderStage SDL_GPUShaderCreateInfo::stage

The stage the shader program corresponds to.

Definition at line 1646 of file SDL_gpu.h.

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

- SDL_gpu.h