adding materials, adding serialization for meshes and materials, random fixes

This commit is contained in:
Erris
2026-03-03 08:51:02 +01:00
parent b7e5ceb1d1
commit 4a624cfe70
16 changed files with 222 additions and 22 deletions

View File

@@ -23,6 +23,7 @@ namespace OpenEngine {
RegisterDrawer<SpriteRendererComponent>("Sprite Renderer", &SpriteOnImGuiRender);
RegisterDrawer<CameraComponent>("Camera", &CameraOnImGuiRender);
RegisterDrawer<MeshComponent>("Mesh", &MeshOnImGuiRender);
RegisterDrawer<MaterialComponent>("Material", &MaterialOnImGuiRender);
scene = context;
selected_context = {};
@@ -51,6 +52,11 @@ namespace OpenEngine {
selected_context.AddComponent<MeshComponent>();
ImGui::CloseCurrentPopup();
}
if (!selected_context.HasComponent<MaterialComponent>())
if (ImGui::MenuItem("Material")) {
selected_context.AddComponent<MaterialComponent>();
ImGui::CloseCurrentPopup();
}
}
void EntityPopup(Ref<Scene>& scene)