Skip to content

Commit

Permalink
Zephyr: Next: add behemoth scene first to trigger node removal bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fleroviux committed Jun 12, 2024
1 parent 1394dac commit 5ac66ef
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions app/next/src/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "main_window.hpp"

static const bool enable_validation_layers = true;
static const bool benchmark_scene_size = true;
static const bool benchmark_scene_size = false;

namespace zephyr {

Expand Down Expand Up @@ -186,19 +186,20 @@ namespace zephyr {
m_camera_node->GetTransform().SetPosition({0.f, 0.f, 5.f});

GLTFLoader gltf_loader{};

m_behemoth_scene = gltf_loader.Parse("models/Behemoth/scene.gltf");
m_behemoth_scene->GetTransform().SetPosition({-1.0f, 0.0f, -5.0f});
m_behemoth_scene->GetTransform().SetRotation(extrinsic_xyz_angles_to_quaternion({-M_PI * 0.5, M_PI, 0.0f}));
m_behemoth_scene->GetTransform().SetScale({0.5f, 0.5f, 0.5f});
m_scene_graph->GetRoot()->Add(m_behemoth_scene);

std::shared_ptr<SceneNode> gltf_scene_1 = gltf_loader.Parse("models/DamagedHelmet/DamagedHelmet.gltf");
gltf_scene_1->GetTransform().SetPosition({1.0f, 0.0f, -5.0f});
gltf_scene_1->GetTransform().SetRotation(extrinsic_xyz_angles_to_quaternion({1.5f, 0.0f, 0.0f}));
m_scene_graph->GetRoot()->Add(std::move(gltf_scene_1));

m_scene_graph->GetRoot()->Add(gltf_loader.Parse("models/triangleWithoutIndices/TriangleWithoutIndices.gltf"));
//m_scene_graph->GetRoot()->Add(gltf_loader.Parse("models/triangle/Triangle.gltf"));

m_behemoth_scene = gltf_loader.Parse("models/Behemoth/scene.gltf");
m_behemoth_scene->GetTransform().SetPosition({-1.0f, 0.0f, -5.0f});
m_behemoth_scene->GetTransform().SetRotation(extrinsic_xyz_angles_to_quaternion({-M_PI * 0.5, M_PI, 0.0f}));
m_behemoth_scene->GetTransform().SetScale({0.5f, 0.5f, 0.5f});
m_scene_graph->GetRoot()->Add(m_behemoth_scene);
}

void MainWindow::CreateBenchmarkScene() {
Expand Down

0 comments on commit 5ac66ef

Please sign in to comment.