![]() |
Rendering Engine 0.2.9
Modular Graphics Rendering Engine | v0.2.9
|
Abstract base for all drawable (renderable) objects in the engine. More...
#include <drawable_component.hpp>
Inherited by rendering_engine::Drawable2D, and rendering_engine::Drawable3D.
Public Member Functions | |
| DrawableComponent (RenderResourceContext renderContext, Scene &scene) | |
| Constructs the DrawableComponent with a resource context. More... | |
| virtual | ~DrawableComponent ()=default |
| Virtual destructor. More... | |
| virtual void | Initialize () |
| Initializes render resource pointers (material, mesh, etc.). Must be called after setting material and mesh names. More... | |
| virtual void | Update (float deltaTime)=0 |
| Updates logic (animation, movement, etc.) for this drawable. More... | |
| virtual void | Shutdown () |
| Releases all render resources owned by this drawable. More... | |
| virtual void | Destroy () |
| Requests destruction of this drawable. More... | |
| void | UpdateOnTick (bool in) |
| DrawableComponent (const DrawableComponent &)=delete | |
| DrawableComponent & | operator= (const DrawableComponent &)=delete |
Protected Member Functions | |
| void | AddRenderBatch (std::string meshName, std::string materialName) |
Protected Attributes | |
| RenderResourceContext | mRenderContext |
| Scene & | mScene |
| std::vector< RenderBatch > | mRenderBatches |
| bool | bUpdateOnTick |
Abstract base for all drawable (renderable) objects in the engine.
Provides core functionality for accessing render resources (meshes, materials, textures) and defines the initialization, update, and draw lifecycle for renderable entities.
Derived classes (such as Drawable2D and Drawable3D) implement type-specific behavior for spatial transforms, camera use, and render submission.
Definition at line 47 of file drawable_component.hpp.
| rendering_engine::DrawableComponent::DrawableComponent | ( | RenderResourceContext | renderContext, |
| Scene & | scene | ||
| ) |
Constructs the DrawableComponent with a resource context.
| renderContext | Rendering resource context (renderer, caches). |
Definition at line 16 of file drawable_component.cpp.
|
virtualdefault |
Virtual destructor.
|
delete |
|
protected |
Definition at line 58 of file drawable_component.cpp.
|
virtual |
Requests destruction of this drawable.
Schedules the drawable for deferred removal via the owning Scene. The drawable is not destroyed immediately; actual cleanup is performed at a safe point during the Scene update cycle.
Reimplemented in rendering_engine::Drawable2D, and rendering_engine::Drawable3D.
Definition at line 49 of file drawable_component.cpp.
|
virtual |
Initializes render resource pointers (material, mesh, etc.). Must be called after setting material and mesh names.
Reimplemented in rendering_engine::Drawable2D, rendering_engine::Drawable3D, rendering_engine::Quad2D, rendering_engine::Rectangle2D, rendering_engine::Sprite2D, rendering_engine::StaticMesh, and rendering_engine::TextBlock2D.
Definition at line 24 of file drawable_component.cpp.
|
delete |
|
virtual |
Releases all render resources owned by this drawable.
Called internally by the Scene during destruction or scene shutdown. This function must free GPU and CPU-side render resources but must not remove the drawable from Scene containers.
Definition at line 37 of file drawable_component.cpp.
|
pure virtual |
Updates logic (animation, movement, etc.) for this drawable.
| deltaTime | Time step (seconds). |
Implemented in rendering_engine::Drawable2D, rendering_engine::Drawable3D, rendering_engine::Quad2D, rendering_engine::Rectangle2D, rendering_engine::Sprite2D, rendering_engine::StaticMesh, and rendering_engine::TextBlock2D.
| void rendering_engine::DrawableComponent::UpdateOnTick | ( | bool | in | ) |
Definition at line 53 of file drawable_component.cpp.
|
protected |
Definition at line 104 of file drawable_component.hpp.
|
protected |
Definition at line 102 of file drawable_component.hpp.
|
protected |
Definition at line 100 of file drawable_component.hpp.
|
protected |
Definition at line 101 of file drawable_component.hpp.