TTF_GPUATLASDRAWSEQUENCE(3type)

πŸ’– TTF_GPUAtlasDrawSequence β€” the glow-up your glyphs deserve πŸ’–

okay bestie, welcome to the SDL_ttf3 manual, page TTF_GPUAtlasDrawSequence(3type). this is a struct, it's a whole vibe, and yes we're gonna get into it.


✨ NAME ✨

TTF_GPUAtlasDrawSequence β€” the draw sequence that gets handed back to you by TTF_GetGPUTextDrawData


πŸ“ HEADER FILE πŸ“

it lives in SDL3_ttf/SDL_ttf.h, no cap. that's the address, that's where it stays.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include "SDL3_ttf/SDL_ttf.h"

typedef struct TTF_GPUAtlasDrawSequence
{
    SDL_GPUTexture *atlas_texture;          /**< Texture atlas that stores the glyphs */
    SDL_FPoint *xy;                         /**< An array of vertex positions */
    SDL_FPoint *uv;                         /**< An array of normalized texture coordinates for each vertex */
    int num_vertices;                       /**< Number of vertices */
    int *indices;                           /**< An array of indices into the 'vertices' arrays */
    int num_indices;                        /**< Number of indices */
    TTF_ImageType image_type;               /**< The image type of this draw sequence */

    struct TTF_GPUAtlasDrawSequence *next;  /**< The next sequence (will be NULL in case of the last sequence) */
} TTF_GPUAtlasDrawSequence;

okay so let's walk the members one by one because each one is doing its little job and honestly? iconic behavior.

  • atlas_texture β€” a SDL_GPUTexture *, aka the texture atlas that stores the glyphs. it's the closet where all your letters hang out. πŸ‘‘
  • xy β€” a SDL_FPoint *, an array of vertex positions. this is the geometry, the layout, the ~shape of it all~. πŸ“
  • uv β€” a SDL_FPoint *, an array of normalized texture coordinates for each vertex. it's the map that says which part of the atlas each vertex is pointing at. πŸ—ΊοΈ
  • num_vertices β€” an int, number of vertices. just a count, bestie, but a load-bearing one. πŸ”’
  • indices β€” an int *, an array of indices into the 'vertices' arrays. yep, the original literally says 'vertices' with the quotes, we're keeping it exactly as-is. πŸŽ€
  • num_indices β€” an int, number of indices. the other count. they're a duo. 🫢
  • image_type β€” a TTF_ImageType, the image type of this draw sequence. tells you what kind of image situation you're in. πŸ–ΌοΈ
  • next β€” a struct TTF_GPUAtlasDrawSequence *, the next sequence. and here's the important bit, bestie: it will be NULL in case of the last sequence. so when you hit NULL, you're done, that's the end of the chain, no more sequences after that. periodt. πŸ’…

⭐ AVAILABILITY ⭐

this struct has been available since SDL_ttf 3.0.0. she's not new-new, she's established.


πŸ‘€ SEE ALSO πŸ‘€


fr fr, this is a 3type page β€” it's describing a data type, not a function. the struct itself doesn't do anything, it just holds all the info that TTF_GetGPUTextDrawData gives you. know the difference, bestie. πŸ’œ

okay that's the whole page, you absolutely ate this reading session, go draw some glyphs 🌸✨

signing off from the SDL_ttf source, version SDL_ttf 3.2.2 β€” mwah, stay hydrated, and remember: NULL means you reached the last sequence πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from