Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions SofaGLFW/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
$<BUILD_INTERFACE:${glfw_SOURCE_DIR}/include>
Expand Down
1 change: 0 additions & 1 deletion SofaGLFW/src/SofaGLFW/SofaGLFWBaseGUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion SofaImGui/src/SofaImGui/ImGuiGUIEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
9 changes: 2 additions & 7 deletions exe/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
#include <sofa/helper/system/FileRepository.h>
#include <sofa/helper/BackTrace.h>
#include <sofa/core/logging/PerComponentLoggingMessageHandler.h>
#include <sofa/simulation/graph/init.h>
#include <sofa/simulation/graph/DAGSimulation.h>
#include <sofa/simulation/Simulation.h>
#include <sofa/simulation/Node.h>
#include <sofa/core/visual/VisualParams.h>
#include <sofa/component/setting/ViewerSetting.h>
Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -160,7 +157,5 @@ int main(int argc, char** argv)
sofa::simulation::node::unload(groot);
}

sofa::simulation::graph::cleanup();

return 0;
}
Loading