logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_GPUBufferUsageFlags - Specifies how a buffer is intended to be used by the client.

Availability

       This datatype is available since SDL 3.2.0.

Description

       A buffer must have at least one usage flag. Note that some usage flag combinations are invalid.

       Unlike   textures,  READ  |  WRITE  can  be  used  for  simultaneous  read-write  usage.  The  same  data
       synchronization concerns as textures apply.

       If you use a STORAGE flag, the data in the buffer must respect std140 layout  conventions.  In  practical
       terms this means you must ensure that vec3 and vec4 fields are 16-byte aligned.

Name

       SDL_GPUBufferUsageFlags - Specifies how a buffer is intended to be used by the client.

See Also

SDL_CreateGPUBuffer(3)

Simple Directmedia Layer                           SDL 3.2.20                     SDL_GPUBufferUsageFlags(3type)

Synopsis

#include<SDL3/SDL_gpu.h>typedefUint32SDL_GPUBufferUsageFlags;#defineSDL_GPU_BUFFERUSAGE_VERTEX(1u<<0)/**<Bufferisavertexbuffer.*/#defineSDL_GPU_BUFFERUSAGE_INDEX(1u<<1)/**<Bufferisanindexbuffer.*/#defineSDL_GPU_BUFFERUSAGE_INDIRECT(1u<<2)/**<Bufferisanindirectbuffer.*/#defineSDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ(1u<<3)/**<Buffersupportsstoragereadsingraphicsstages.*/#defineSDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ(1u<<4)/**<Buffersupportsstoragereadsinthecomputestage.*/#defineSDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE(1u<<5)/**<Buffersupportsstoragewritesinthecomputestage.*/

See Also