48 auto clamp = [](
f32 v) ->
u8 {
49 return static_cast<u8>(std::min(std::max(v, 0.0f), 1.0f) * 255.0f + 0.5f);
51 return static_cast<u32>(clamp(r)) | (
static_cast<u32>(clamp(g)) << 8)
52 | (
static_cast<u32>(clamp(b)) << 16) | (
static_cast<u32>(clamp(a)) << 24);
Core type definitions and utilities for ESEngine.
std::int32_t i32
Signed 32-bit integer.
f32 withTextureSlot(f32 texIndex, i32 slot)
i32 batchGlyphModeBits(TextGlyphMode mode)
constexpr i32 BATCH_DITHER_BIT
constexpr i32 BATCH_SLOT_BITS
constexpr i32 BATCH_DITHER_PHASE_BIT
u32 packColor(f32 r, f32 g, f32 b, f32 a)
std::uint32_t u32
Unsigned 32-bit integer.
std::uint8_t u8
Unsigned 8-bit integer.
float f32
32-bit floating point
One vertex of the shared batch stream.