48 { -0.5f, -0.5f, 0.0f, 1.0f },
49 { 0.5f, -0.5f, 0.0f, 1.0f },
50 { 0.5f, 0.5f, 0.0f, 1.0f },
51 { -0.5f, 0.5f, 0.0f, 1.0f },
68 f32 dx = px - center.x;
69 f32 dy = py - center.y;
70 return { center.x + dx * cosA - dy * sinA,
71 center.y + dx * sinA + dy * cosA,
177 u32 vertexByteOffset,
u32 vertexCount,
u32 indexOffset,
u32 indexCount,
188 u32 vertexByteOffset,
u32 vertexCount,
const u32* localIndices,
u32 indexCount,
191 u32 vertexByteOffset,
u32 vertexCount,
const u16* localIndices,
u32 indexCount,
202 const void* verts,
u32 vertexCount,
203 const u32* localIndices,
u32 indexCount,
213 const u32* localIndices,
u32 indexCount,
Blend mode enumeration for custom rendering.
Core type definitions and utilities for ESEngine.
void appendQuad(TransientBufferPool &pool, DrawList &drawList, const ClipState &clips, const BatchVertex quad[4], const BatchDrawKey &key)
constexpr glm::vec2 BATCH_QUAD_TEX_COORDS[4]
Unit-quad texture coordinates matching BATCH_QUAD_POSITIONS.
void appendQuads(TransientBufferPool &pool, DrawList &drawList, const ClipState &clips, const BatchVertex *quads, u32 quadCount, const BatchDrawKey &key)
std::int32_t i32
Signed 32-bit integer.
void appendIndexedDraw(TransientBufferPool &pool, DrawList &drawList, const ClipState &clips, const void *verts, u32 vertexCount, const u32 *localIndices, u32 indexCount, const BatchDrawKey &key)
Copies raw vertices into the key's stream, then pushes one DrawCommand spanning them.
void pushBatchDraw(DrawList &drawList, const ClipState &clips, u32 vertexByteOffset, u32 vertexCount, u32 indexOffset, u32 indexCount, const BatchDrawKey &key)
Atomic primitive: assemble + clip + push one DrawCommand for an index range ALREADY written into (or,...
constexpr Entity INVALID_ENTITY
Invalid entity sentinel value.
std::int16_t i16
Signed 16-bit integer.
constexpr glm::vec4 BATCH_QUAD_POSITIONS[4]
Canonical centered unit-quad corner positions (CCW).
std::uint32_t u32
Unsigned 32-bit integer.
BlendMode
Predefined blend modes for rendering.
std::uint8_t u8
Unsigned 8-bit integer.
std::uint16_t u16
Unsigned 16-bit integer.
void pushBatchCommand(TransientBufferPool &pool, DrawList &drawList, const ClipState &clips, u32 vertexByteOffset, u32 vertexCount, const u32 *localIndices, u32 indexCount, const BatchDrawKey &key)
Pushes a DrawCommand for vertices ALREADY resident in the Batch stream at vertexByteOffset.
void appendIndexedBatch(TransientBufferPool &pool, DrawList &drawList, const ClipState &clips, const BatchVertex *verts, u32 vertexCount, const u32 *localIndices, u32 indexCount, const BatchDrawKey &key)
Copies verts into the Batch stream, then pushes one DrawCommand spanning them.
LayoutId
Identifies a transient vertex stream / vertex format. Each layout has its own VBO+EBO+VAO in Transien...
bool batchEntityVisible(const DrawList &drawList, const ClipState &clips, Entity entity, i32 layer, u32 cullBit)
glm::vec3 rotatePoint(const glm::vec3 ¢er, f32 px, f32 py, f32 cosA, f32 sinA)
Rotates a point around center in the XY plane, carrying the center's z through untouched — the rotati...
constexpr u32 BATCH_QUAD_INDICES[6]
Canonical two-triangle quad winding shared by every batch path.
GfxTopology
How a pipeline's indices assemble into primitives. Baked into the pipeline, as WebGPU bakes it,...
@ Triangles
Every three indices a triangle: all geometry the engine draws.
float f32
32-bit floating point
Non-geometry attributes of a batch draw — everything needed to build the sort key + DrawCommand.
i16 depthBias
Depth-buffer units toward the eye.
GfxTopology topology
How the indices assemble.
BufferHandle instanceBuffer
BufferHandle vertexBuffer
u8 cull
CullMode: 0 = none, 1 = back, 2 = front.
VertexLayoutHandle vertexLayout
One vertex of the shared batch stream.
Entity identifier with packed index + generation.