|
Monad Engine da02fba2
> Undercity Codex_
|
Bridges the scene graph with the render pipeline by submitting a RenderCommand each frame. More...
Include dependency graph for MeshComponent.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| class | mnd::MeshComponent |
| Makes a GameObject renderable by submitting its mesh each frame. More... | |
Namespaces | |
| namespace | mnd |
Bridges the scene graph with the render pipeline by submitting a RenderCommand each frame.
Attaching a MeshComponent to a GameObject makes it visible. On each Update() call the component reads the owner's world transform, packages it together with its Mesh and Material into a RenderCommand, and submits it to the engine's RenderQueue.
Both Mesh and Material are shared via shared_ptr — multiple MeshComponents (and multiple GameObjects) can reference the same GPU resources without duplication. The RenderCommand holds only raw pointers for the duration of the frame; it does not extend lifetime.
Definition in file MeshComponent.h.