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 mindfulSDL_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 π
SDL_CreateGPUTexture(3)β go make one, bestie π
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
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms