diff --git a/src/NazaraEditor/Editor/Application.cpp b/src/NazaraEditor/Editor/Application.cpp index c10398d..24ce8cf 100644 --- a/src/NazaraEditor/Editor/Application.cpp +++ b/src/NazaraEditor/Editor/Application.cpp @@ -47,14 +47,10 @@ namespace NzEditor auto cube = CreateEntity("Cube"); Nz::GraphicsComponent& graphicsComponent = cube.emplace(); - std::shared_ptr boxMesh = Nz::GraphicalMesh::Build(Nz::Primitive::Box(Nz::Vector3f(4.f), Nz::Vector3ui::Zero(), Nz::Matrix4f::Scale(Nz::Vector3f(-1.f)), Nz::Rectf(0.f, 0.f, 2.f, 2.f))); + std::shared_ptr boxMesh = Nz::GraphicalMesh::Build(Nz::Primitive::Box(Nz::Vector3f(1.f), Nz::Vector3ui::Zero(), Nz::Matrix4f::Scale(Nz::Vector3f(1.f)), Nz::Rectf(0.f, 0.f, 2.f, 2.f))); std::shared_ptr boxMat = Nz::MaterialInstance::Instantiate(Nz::MaterialType::Phong); - boxMat->DisablePass("ShadowPass"); - boxMat->UpdatePassesStates([&](Nz::RenderStates& states) - { - states.frontFace = Nz::FrontFace::Clockwise; - }); + std::shared_ptr boxModel = std::make_shared(std::move(boxMesh)); boxModel->SetMaterial(0, std::move(boxMat)); graphicsComponent.AttachRenderable(boxModel);