Kelsidavis-WoWee/src/rendering/scene.cpp
Kelsi 7ab25c63c9 Optimize release builds: LTO, -O3, visibility, micro-perf fixes
- CMakeLists.txt: enable LTO for Release, add -O3 and -fvisibility=hidden
- scene: addMesh uses std::move, removeMesh takes const shared_ptr&
- entity: std::move entity into map instead of copy
- clouds: cosf/sinf instead of cos/sin (float math, avoids double promotion)
- game_screen: reserve trainer spell vector before push_back loop
- warden_module/emulator: replace std::endl (121 stream flushes) with '\n'
2026-02-18 20:10:47 -08:00

24 lines
493 B
C++

#include "rendering/scene.hpp"
#include "rendering/mesh.hpp"
#include <algorithm>
namespace wowee {
namespace rendering {
void Scene::addMesh(std::shared_ptr<Mesh> mesh) {
meshes.push_back(std::move(mesh));
}
void Scene::removeMesh(const std::shared_ptr<Mesh>& mesh) {
auto it = std::find(meshes.begin(), meshes.end(), mesh);
if (it != meshes.end()) {
meshes.erase(it);
}
}
void Scene::clear() {
meshes.clear();
}
} // namespace rendering
} // namespace wowee