Epok Engine

EPOK RUNTIME

epok::draw_key_2d

Function · 1 overload

Function

---- draw order ---------------------------------------------------------------------- A single monotonically comparable key so the renderer never needs a multi-field comparator: layer (int8, coarse) above draw_order (int16) above the creation index (uint16, the tie breaker that makes the order stable and reproducible across frames).

Belongs to
epok
Header
world2d.hpp
Overloads
1

Declaration

Declaration
inline uint64_t draw_key_2d(int8_t layer, int16_t draw_order, uint16_t creation)

---- draw order ---------------------------------------------------------------------- A single monotonically comparable key so the renderer never needs a multi-field comparator: layer (int8, coarse) above draw_order (int16) above the creation index (uint16, the tie breaker that makes the order stable and reproducible across frames).

ParameterTypeMeaning
layerint8_tValue supplied for layer. Keep referenced or pointed-to data valid for the complete call.
draw_orderint16_tValue supplied for draw_order. Keep referenced or pointed-to data valid for the complete call.
creationuint16_tValue supplied for creation. Keep referenced or pointed-to data valid for the complete call.

Returns: uint64_t. Check the value before continuing when it represents success, availability or a resource handle.

Example

C++ example
#include "world2d.hpp"

// Assume these named values have been initialized with valid data:
// int8_t layer
// int16_t draw_order
// uint16_t creation

auto result = epok::draw_key_2d(layer, draw_order, creation);

Why use it

The API maps closely to PSX GPU work, giving predictable ordering and low overhead.

Trade-offs and warnings

Respect packet lifetime, ordering-table direction and per-frame GPU/VRAM budgets; submission is not a desktop immediate-mode draw call.

Declared in runtime/world2d.hpp:262

Related members