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

#include <TilemapRenderPlugin.hpp>

Inheritance diagram for esengine::TilemapRenderPlugin:

Public Member Functions

void init (RenderFrameContext &ctx) override
void shutdown () override
void setTilemapSystem (tilemap::TilemapSystem *system)
void collect (RenderCollectContext &ctx) override
const char * collectScope () const override
 What this plugin's collect is called in a frame profile.
Public Member Functions inherited from esengine::RenderTypePlugin
virtual ~RenderTypePlugin ()=default
virtual bool castsShadows () const
 Whether what this plugin draws belongs in a shadow map.
virtual bool castInputs (RenderFrameContext &, ecs::Registry &, u64 &)
 For a plugin that casts: one number for everything its depth collect reads apart from the shadow views and the frame's camera, so a frame whose number, views and camera match those of the frame that drew the shadow map need not collect it again.
virtual bool castHeldInputs (u64 &) const
virtual u32 castMoverCount () const
virtual bool drawsMotion () const
virtual bool drawsScreenUI () const
 Whether this plugin can draw an entity that lives in a UI tree.
virtual void scheduleSkins (RenderFrameContext &ctx, ecs::Registry &registry, SkinCache &cache)
 Make ready the programs entities will be asked for, drawing none.
virtual RenderPrewarmResult prewarm (RenderFrameContext &ctx, ecs::Registry &registry, const Entity *entities, u32 count, bool shadowPasses)
virtual RenderPrewarmResult prewarmDocument (RenderFrameContext &ctx, const MeshDocumentRecord *rows, u32 count, bool shadowPasses)
 The same readiness, asked of a PREPARED cell's own description.
virtual bool clusterInspect (u32, u32 &, u32 &) const
 What the last frames drew of the Cluster LOD mesh of the entity entityId.

Detailed Description

Definition at line 17 of file TilemapRenderPlugin.hpp.

Member Function Documentation

◆ collect()

void esengine::TilemapRenderPlugin::collect ( RenderCollectContext & ctx)
overridevirtual

Implements esengine::RenderTypePlugin.

Definition at line 181 of file TilemapRenderPlugin.cpp.

References esengine::appendIndexedBatch(), esengine::tilemap::atlasCells(), esengine::Batch, esengine::batchEntityVisible(), esengine::CameraView::bottom, esengine::RenderCollectContext::buffer_pool, esengine::RenderCollectContext::camera, esengine::tilemap::CHUNK_SIZE, esengine::RenderCollectContext::clip_state, esengine::GfxDevice::createBuffer(), esengine::ctx(), esengine::BatchDrawKey::cullBit, esengine::GfxDevice::deleteBuffer(), esengine::GfxDevice::deviceGeneration(), esengine::RenderCollectContext::draw_list, esengine::BatchDrawKey::entity, esengine::RenderCollectContext::frame_context, esengine::resource::Handle< T >::id(), esengine::Index, esengine::BatchDrawKey::indexBuffer, esengine::Invalid, esengine::INVALID_ENTITY, esengine::resource::Handle< T >::isValid(), esengine::BatchDrawKey::layer, esengine::CameraView::left, esengine::Lit, esengine::ecs::TilemapLayer::lit, esengine::Normal, esengine::ecs::GroupOpacityLookup::of(), esengine::ecs::TilemapLayer::opacity, esengine::ecs::TilemapLayer::originOffset, esengine::packColor(), esengine::CameraView::parallaxCenter, esengine::ecs::TilemapLayer::parallaxFactor, esengine::BatchVertex::position, esengine::pushBatchDraw(), esengine::rebased(), esengine::RenderCollectContext::registry, esengine::ecs::TilemapLayer::renderLayer, esengine::CameraView::right, esengine::Sprite, esengine::BatchVertex::texCoord, esengine::ecs::TilemapLayer::tileset, esengine::ecs::TilemapLayer::tilesetColumns, esengine::ecs::TilemapLayer::tintColor, esengine::CameraView::top, esengine::GfxContent::transient(), esengine::Vertex, esengine::BatchDrawKey::vertexBuffer, esengine::BatchDrawKey::vertexLayout, and esengine::ecs::TilemapLayer::visible.

◆ collectScope()

const char * esengine::TilemapRenderPlugin::collectScope ( ) const
inlineoverridevirtual

What this plugin's collect is called in a frame profile.

A literal: the profiler keys scopes by content and keeps the pointer. A type that does not answer is reported as other rather than folded into a neighbour, whose cost it would become.

Reimplemented from esengine::RenderTypePlugin.

Definition at line 25 of file TilemapRenderPlugin.hpp.

◆ init()

void esengine::TilemapRenderPlugin::init ( RenderFrameContext & ctx)
overridevirtual

Reimplemented from esengine::RenderTypePlugin.

Definition at line 17 of file TilemapRenderPlugin.cpp.

References esengine::ctx().

◆ setTilemapSystem()

void esengine::TilemapRenderPlugin::setTilemapSystem ( tilemap::TilemapSystem * system)
inline

Definition at line 22 of file TilemapRenderPlugin.hpp.

◆ shutdown()

void esengine::TilemapRenderPlugin::shutdown ( )
overridevirtual

Reimplemented from esengine::RenderTypePlugin.

Definition at line 176 of file TilemapRenderPlugin.cpp.


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