Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::FrameCapture Class Reference

#include <FrameCapture.hpp>

Public Member Functions

void requestCapture ()
void beginFrame ()
void endFrame ()
void beginPass (CapturePass kind)
i32 currentPass () const
bool isCapturing () const
bool hasCapturedData () const
void record (const DrawCommand &cmd, std::span< const Entity > entities)
u32 getRecordCount () const
const DrawCallRecord * getRecords () const
const Entity * getEntities () const
u32 getEntityCount () const
const u32 * getTextures () const
u32 getTextureCount () const
u32 getPassCount () const
u32 recordsInPass (i32 pass) const
void setReplayMode (i32 limit)
void clearReplayMode ()
bool isReplaying () const
bool stepReplay ()

Detailed Description

A capture spans beginFrame to endFrame, so every camera and the overlay land in it, numbered by pass in the order they ran. Passes are counted on every frame, captured or not: a replay names its pass by that number on a later frame.

Definition at line 66 of file FrameCapture.hpp.

Member Function Documentation

◆ beginFrame()

void esengine::FrameCapture::beginFrame ( )

Definition at line 9 of file FrameCapture.cpp.

◆ beginPass()

void esengine::FrameCapture::beginPass ( CapturePass kind)

Definition at line 28 of file FrameCapture.cpp.

◆ clearReplayMode()

void esengine::FrameCapture::clearReplayMode ( )

Definition at line 76 of file FrameCapture.cpp.

◆ currentPass()

i32 esengine::FrameCapture::currentPass ( ) const
inline

Definition at line 77 of file FrameCapture.hpp.

◆ endFrame()

void esengine::FrameCapture::endFrame ( )

Definition at line 21 of file FrameCapture.cpp.

◆ getEntities()

const Entity * esengine::FrameCapture::getEntities ( ) const
inline

Definition at line 87 of file FrameCapture.hpp.

◆ getEntityCount()

u32 esengine::FrameCapture::getEntityCount ( ) const
inline

Definition at line 88 of file FrameCapture.hpp.

◆ getPassCount()

u32 esengine::FrameCapture::getPassCount ( ) const
inline

Definition at line 91 of file FrameCapture.hpp.

◆ getRecordCount()

u32 esengine::FrameCapture::getRecordCount ( ) const
inline

Definition at line 85 of file FrameCapture.hpp.

◆ getRecords()

const DrawCallRecord * esengine::FrameCapture::getRecords ( ) const
inline

Definition at line 86 of file FrameCapture.hpp.

◆ getTextureCount()

u32 esengine::FrameCapture::getTextureCount ( ) const
inline

Definition at line 90 of file FrameCapture.hpp.

◆ getTextures()

const u32 * esengine::FrameCapture::getTextures ( ) const
inline

Definition at line 89 of file FrameCapture.hpp.

◆ hasCapturedData()

bool esengine::FrameCapture::hasCapturedData ( ) const
inline

Definition at line 80 of file FrameCapture.hpp.

◆ isCapturing()

bool esengine::FrameCapture::isCapturing ( ) const
inline

Definition at line 79 of file FrameCapture.hpp.

Referenced by esengine::DrawList::execute().

◆ isReplaying()

bool esengine::FrameCapture::isReplaying ( ) const
inline

Definition at line 97 of file FrameCapture.hpp.

Referenced by esengine::DrawList::execute().

◆ record()

void esengine::FrameCapture::record ( const DrawCommand & cmd,
std::span< const Entity > entities )

entities are the ones the draw merged, in draw order.

Definition at line 33 of file FrameCapture.cpp.

References esengine::DrawCallRecord::blend_mode, esengine::DrawCommand::blend_mode, esengine::DrawCallRecord::break_reason, esengine::DrawCommand::break_reason, esengine::CMD_STATE_SCISSOR, esengine::CMD_STATE_STENCIL_TEST, esengine::CMD_STATE_STENCIL_WRITE, esengine::DrawCallRecord::entity_count, esengine::DrawCallRecord::entity_offset, esengine::DrawCallRecord::index, esengine::DrawCallRecord::index_count, esengine::DrawCommand::index_count, esengine::DrawCallRecord::instance_count, esengine::DrawCommand::instance_count, esengine::DrawCallRecord::layer, esengine::DrawCommand::layer, esengine::DrawCallRecord::material_id, esengine::DrawCommand::material_id, esengine::DrawCallRecord::pass, esengine::DrawCallRecord::pass_kind, esengine::DrawCallRecord::scissor, esengine::DrawCommand::scissor, esengine::DrawCallRecord::scissor_enabled, esengine::DrawCallRecord::shader_id, esengine::DrawCommand::shader_id, esengine::DrawCallRecord::stage, esengine::DrawCommand::stage, esengine::DrawCommand::state_flags, esengine::DrawCallRecord::stencil_ref, esengine::DrawCommand::stencil_ref, esengine::DrawCallRecord::stencil_test, esengine::DrawCallRecord::stencil_write, esengine::DrawCommand::texture_count, esengine::DrawCallRecord::texture_id, esengine::DrawCommand::texture_ids, esengine::DrawCallRecord::texture_offset, esengine::DrawCallRecord::texture_slot_usage, esengine::DrawCallRecord::triangle_count, esengine::DrawCallRecord::type, and esengine::DrawCommand::type.

Referenced by esengine::DrawList::execute().

◆ recordsInPass()

u32 esengine::FrameCapture::recordsInPass ( i32 pass) const

How many draws the captured frame's pass pass made.

Definition at line 65 of file FrameCapture.cpp.

◆ requestCapture()

void esengine::FrameCapture::requestCapture ( )
inline

Drops the last capture: until the next frame lands, there is none to read.

Definition at line 69 of file FrameCapture.hpp.

◆ setReplayMode()

void esengine::FrameCapture::setReplayMode ( i32 limit)

Definition at line 70 of file FrameCapture.cpp.

◆ stepReplay()

bool esengine::FrameCapture::stepReplay ( )
inline

Counts one replayed draw; true once the replay has drawn its last.

Definition at line 99 of file FrameCapture.hpp.

Referenced by esengine::DrawList::execute().


The documentation for this class was generated from the following files: