Function CE::Rendering::Submission::resolve_sprite
Defined in File draw2d.h
Function Documentation
-
DrawPacket2D CE::Rendering::Submission::resolve_sprite(const CE::Assets::Sprites::Asset &sprite, CE::Assets::Grids::CellIndex cell, const DrawStyle2D &style, const Context2D &context)
Declaration:
[[nodiscard]]Resolve one sprite cell into a validated draw packet without backend calls.
Keep inputs stable during CPU resolution. No binding, playback advancement or frame publication occurs; invalid cells/materials/ranges or image parameters reject resolution, and allocation failures propagate.
- Parameters:
sprite – CE::Assets::Sprites::Asset whose geometry/image handles are retained by the packet.
cell – Zero-based grid cell, checked against the sprite definition.
style – Copied transform/material/draw values; an absent material uses the sprite’s.
context – Pass values and optional image insertion; an image key must be nonempty and absent from style.parameters.
- Returns:
Owned packet ready to add to a render pass; native use requires its live resource domain.