|
group2 0.1.0
CSE 125 Group 2
|
SDF glyph atlas baking and GPU upload implementation. More...
#include "SdfAtlas.hpp"#include <SDL3/SDL.h>#include <cstring>#include <glm/glm.hpp>#include <stb_truetype.h>#include <vector>Classes | |
| struct | Shelf |
| Single shelf row used by the shelf-packing algorithm. More... | |
Macros | |
| #define | STB_TRUETYPE_IMPLEMENTATION |
Functions | |
| static bool | packRect (std::vector< Shelf > &shelves, int atlasW, int atlasH, int w, int h, int &outX, int &outY) |
| Try to pack a rectangle into the atlas using shelf-packing. | |
SDF glyph atlas baking and GPU upload implementation.
| #define STB_TRUETYPE_IMPLEMENTATION |
|
static |
Try to pack a rectangle into the atlas using shelf-packing.
| shelves | Current shelf state. |
| atlasW | Atlas width in pixels. |
| atlasH | Atlas height in pixels. |
| w | Rectangle width to pack. |
| h | Rectangle height to pack. |
| outX | Output x position in the atlas. |
| outY | Output y position in the atlas. |