We got GameObjects / Components and shit

This commit is contained in:
2026-01-10 06:09:50 +01:00
parent 10b00b0525
commit 0bfc5e0705
35 changed files with 1546 additions and 331 deletions

View File

@@ -0,0 +1,19 @@
#include <destrum/Components/MeshRendererComponent.h>
#include <destrum/ObjectModel/Transform.h>
MeshRendererComponent::MeshRendererComponent(GameObject& parent): Component(parent, "MeshRendererComponent") {
}
void MeshRendererComponent::Start() {
Component::Start();
}
void MeshRendererComponent::Update() {
}
void MeshRendererComponent::Render(const RenderContext& ctx) {
if (meshID != NULL_MESH_ID && materialID != NULL_MATERIAL_ID) {
ctx.renderer.drawMesh(meshID, GetTransform().GetWorldMatrix(), materialID);
}
}