SDL_GPUTextureType(3type)

✨ SDL_GPUTextureType ✨

okay so bestie, this is a page from the SDL3 DATATYPES collection πŸ’– and it's all about SDL_GPUTextureType β€” literally the thing that tells you what kind of texture you're dealing with. like, is it flat? is it a stack? is it a cube?? the vibes vary 🌈


πŸŽ€ NAME πŸŽ€

SDL_GPUTextureType β€” Specifies the type of a texture. that's it, that's the whole job πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_gpu.h>

typedef enum SDL_GPUTextureType
{
    SDL_GPU_TEXTURETYPE_2D,         /**< The texture is a 2-dimensional image. */
    SDL_GPU_TEXTURETYPE_2D_ARRAY,   /**< The texture is a 2-dimensional array image. */
    SDL_GPU_TEXTURETYPE_3D,         /**< The texture is a 3-dimensional image. */
    SDL_GPU_TEXTURETYPE_CUBE,       /**< The texture is a cube image. */
    SDL_GPU_TEXTURETYPE_CUBE_ARRAY  /**< The texture is a cube array image. */
} SDL_GPUTextureType;

so like, five whole options, and each one is a different flavor of texture πŸ“ let's break them down:

  • SDL_GPU_TEXTURETYPE_2D β€” the classic. a 2-dimensional image, the vanilla of textures, no notes πŸ’…
  • SDL_GPU_TEXTURETYPE_2D_ARRAY β€” still 2D, but it's giving array. a 2-dimensional array image. so many lil 2D slices, all stacked, all iconic ✨
  • SDL_GPU_TEXTURETYPE_3D β€” we went 3D bestie!! a 3-dimensional image. volume. depth. main character energy πŸ”₯
  • SDL_GPU_TEXTURETYPE_CUBE β€” a cube image 🧊 yes like a cube map, six faces, very demure, very mindful
  • SDL_GPU_TEXTURETYPE_CUBE_ARRAY β€” and FINALLY, the crown jewel πŸ‘‘ a cube array image. cubes upon cubes. the way that this enum just keeps going?? obsessed 😭
ngl if you're picking a texture type and you're not sure, that's a whole separate quest β€” this page is just the menu, not the recommendation πŸ’€

πŸ¦‹ AVAILABILITY πŸ¦‹

This enum is available since SDL 3.2.0. so if you're on anything older, it's not you, it's the version 🫢


πŸ’œ SEE ALSO πŸ’œ


and that's the whole page!! sending love from the Simple Directmedia Layer crew πŸ’– this is the SDL 3.4.18 era of SDL_GPUTextureType(3type) and yes it's still serving ✨ bye ily, go build something cute 🌸

πŸ“¦ where this page comes from