|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
#include <ParticlePlugin.hpp>

Public Member Functions | |
| void | init (RenderFrameContext &ctx) override |
| void | shutdown () override |
| void | setParticleSystem (particle::ParticleSystem *system) |
| bool | drawsScreenUI () const override |
| Whether this plugin can draw an entity that lives in a UI tree. | |
| 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 void | scheduleSkins (RenderFrameContext &ctx, ecs::Registry ®istry, SkinCache &cache) |
Make ready the programs entities will be asked for, drawing none. | |
| virtual RenderPrewarmResult | prewarm (RenderFrameContext &ctx, ecs::Registry ®istry, 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. | |
Definition at line 15 of file ParticlePlugin.hpp.
|
overridevirtual |
Implements esengine::RenderTypePlugin.
Definition at line 78 of file ParticlePlugin.cpp.
References esengine::RenderCollectContext::accepts(), esengine::particle::Particle::added_velocity, esengine::particle::Particle::age, esengine::particle::Particle::alive, esengine::appendIndexedBatch(), esengine::RenderCollectContext::buffer_pool, esengine::RenderCollectContext::camera, esengine::RenderCollectContext::clip_state, esengine::particle::Particle::color, esengine::ctx(), esengine::BatchDrawKey::depthTest, esengine::BatchDrawKey::depthWrite, esengine::RenderCollectContext::draw_list, esengine::ecs::Transform::ensureDecomposed(), esengine::CameraView::eye, esengine::RenderCollectContext::frame_context, esengine::particle::Particle::generation, esengine::Texture::getId(), esengine::BatchDrawKey::instanceBuffer, esengine::BatchDrawKey::instanceCount, esengine::Invalid, esengine::RenderCollectContext::isOverlay(), esengine::particle::kMaxTrailPoints, esengine::particle::StretchedQuad::length, esengine::particle::Particle::lifetime, esengine::ecs::Local, esengine::packColor(), esengine::ParticleInstance, esengine::particle::Particle::position, esengine::pushBatchDraw(), esengine::rebased(), esengine::RenderCollectContext::registry, esengine::ribbonSide(), esengine::particle::Particle::rotation, esengine::particle::StretchedQuad::rotation, esengine::particle::Particle::size, esengine::RenderCollectContext::sortDepth(), esengine::particle::Particle::sprite_frame, esengine::ecs::Stretched, esengine::particle::stretchedQuad(), esengine::GpuParticles::submit(), esengine::BatchDrawKey::textureId, esengine::towardViewer(), esengine::Trail, esengine::RenderCollectContext::treeLayer(), esengine::particle::unitHash(), esengine::particle::Particle::velocity, and esengine::particle::velocityOnScreen().
|
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 28 of file ParticlePlugin.hpp.
|
inlineoverridevirtual |
Whether this plugin can draw an entity that lives in a UI tree.
The overlay collect runs only these. Saying yes is a promise to consult RenderCollectContext::accepts, without which the plugin draws the screen's entities in the world's pass too.
Reimplemented from esengine::RenderTypePlugin.
Definition at line 26 of file ParticlePlugin.hpp.
|
overridevirtual |
Reimplemented from esengine::RenderTypePlugin.
Definition at line 40 of file ParticlePlugin.cpp.
References esengine::resource::ShaderParser::assembleStage(), esengine::Shader::bind(), esengine::ctx(), esengine::resource::Fragment, esengine::Shader::getProgramId(), esengine::GLSL_ES300, esengine::Shader::isValid(), esengine::Shader::language(), esengine::resource::ShaderParser::parse(), esengine::ShaderEmbeds::PARTICLE, esengine::Shader::setUniform(), esengine::Shader::unbind(), esengine::resource::Vertex, and esengine::Shader::whenLinked().
|
inline |
Definition at line 21 of file ParticlePlugin.hpp.
|
inlineoverridevirtual |
Reimplemented from esengine::RenderTypePlugin.
Definition at line 18 of file ParticlePlugin.hpp.