diff --git a/SofaGLFW/CMakeLists.txt b/SofaGLFW/CMakeLists.txt index a8368a7458..6a92011207 100644 --- a/SofaGLFW/CMakeLists.txt +++ b/SofaGLFW/CMakeLists.txt @@ -4,7 +4,7 @@ project(SofaGLFW LANGUAGES CXX) include(cmake/environment.cmake) find_package(Sofa.Config REQUIRED) -sofa_find_package(Sofa.Simulation.Graph REQUIRED) +sofa_find_package(Sofa.Simulation.Common REQUIRED) sofa_find_package(Sofa.GL REQUIRED) sofa_find_package(Sofa.Component.Visual REQUIRED) sofa_find_package(Sofa.GUI.Common QUIET) @@ -67,7 +67,7 @@ endif() add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES}) -target_link_libraries(${PROJECT_NAME} PUBLIC Sofa.GL Sofa.Simulation.Graph Sofa.Component.Visual) +target_link_libraries(${PROJECT_NAME} PUBLIC Sofa.GL Sofa.Simulation.Common Sofa.Component.Visual) target_link_libraries(${PROJECT_NAME} PUBLIC glfw) target_include_directories(${PROJECT_NAME} PUBLIC $ diff --git a/SofaGLFW/src/SofaGLFW/SofaGLFWBaseGUI.cpp b/SofaGLFW/src/SofaGLFW/SofaGLFWBaseGUI.cpp index 364b7e075c..950ddfcaee 100644 --- a/SofaGLFW/src/SofaGLFW/SofaGLFWBaseGUI.cpp +++ b/SofaGLFW/src/SofaGLFW/SofaGLFWBaseGUI.cpp @@ -61,7 +61,6 @@ using std::endl; using namespace sofa::type; using namespace sofa::defaulttype; using namespace sofa::gl; -using simulation::getSimulation; using namespace sofa::simulation; using namespace sofa::gui::common; using namespace core::visual; diff --git a/SofaImGui/src/SofaImGui/ImGuiGUIEngine.cpp b/SofaImGui/src/SofaImGui/ImGuiGUIEngine.cpp index 205e127af0..e6380569fc 100644 --- a/SofaImGui/src/SofaImGui/ImGuiGUIEngine.cpp +++ b/SofaImGui/src/SofaImGui/ImGuiGUIEngine.cpp @@ -217,7 +217,7 @@ void ImGuiGUIEngine::loadFile(sofaglfw::SofaGLFWBaseGUI* baseGUI, sofa::core::sp groot = sofa::simulation::node::load(filePathName.c_str()); if( !groot ) - groot = sofa::simulation::getSimulation()->createNewGraph(""); + groot = sofa::simulation::MainSimulation::getSimulation()->createNewGraph(""); baseGUI->setSimulation(groot, filePathName); baseGUI->setWindowTitle(nullptr, std::string("SOFA - " + filePathName).c_str()); diff --git a/exe/Main.cpp b/exe/Main.cpp index 09e8c71043..40e080fca7 100644 --- a/exe/Main.cpp +++ b/exe/Main.cpp @@ -28,8 +28,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -67,8 +66,6 @@ int main(int argc, char** argv) sofa::helper::BackTrace::autodump(); - sofa::simulation::graph::init(); - // create an instance of SofaGLFWGUI // linked with the simulation sofaglfw::SofaGLFWBaseGUI glfwGUI; @@ -94,7 +91,7 @@ int main(int argc, char** argv) auto groot = sofa::simulation::node::load(fileName.c_str()); if( !groot ) { - groot = sofa::simulation::getSimulation()->createNewGraph(""); + groot = sofa::simulation::MainSimulation::getSimulation()->createNewGraph(""); } glfwGUI.setSimulation(groot, fileName); @@ -160,7 +157,5 @@ int main(int argc, char** argv) sofa::simulation::node::unload(groot); } - sofa::simulation::graph::cleanup(); - return 0; }