diff --git a/doc/samples/meshviewer/meshviewer.cpp b/doc/samples/meshviewer/meshviewer.cpp index 674a4dfd..5ff3168a 100644 --- a/doc/samples/meshviewer/meshviewer.cpp +++ b/doc/samples/meshviewer/meshviewer.cpp @@ -152,6 +152,8 @@ MeshViewer::~MeshViewer() //----------------------------------------------------------------------------- void MeshViewer::Start() { + if (m_init) return; + /** OLD STUFF **/ //Prepare(); @@ -185,17 +187,24 @@ void MeshViewer::Start() m_controller->Init(m_profile); #endif //HAS_INPUT - /** ----- Init is done ----- **/ - m_init = true; + //Ref all entities + for (Entity* entity : m_entities) Ticker::Ref(entity); /** ----- Start threads ----- **/ m_file_check->Start(); + /** ----- Init is done ----- **/ + m_init = true; } //----------------------------------------------------------------------------- void MeshViewer::Stop() { + if (!m_init) return; + + /** OLD STUFF **/ + //Unprepare(); + //Destroy scene setup UpdateSceneSetup(true); @@ -272,7 +281,10 @@ void MeshViewer::TickGame(float seconds) { //Shutdown logic if (m_controller->IsKeyPressed(MeshViewerKeyInput::Exit)) + { Ticker::Shutdown(); + return; + } } #endif //HAS_INPUT diff --git a/src/Makefile.am b/src/Makefile.am index 0919f743..00a84e9d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -106,7 +106,7 @@ liblolcore_sources = \ gpu/lolfx.cpp \ \ mesh/mesh.cpp mesh/mesh.h \ - mesh/primitive.cpp mesh/primitive.h \ + mesh/primitivemesh.cpp mesh/primitivemesh.h \ \ sys/init.cpp sys/timer.cpp sys/file.cpp sys/hacks.cpp \ sys/thread.cpp sys/threadbase.h \ diff --git a/src/lol/extras.h b/src/lol/extras.h index 6a4d6dbf..ac59e275 100644 --- a/src/lol/extras.h +++ b/src/lol/extras.h @@ -51,7 +51,7 @@ // Other objects #include #include -#include +#include #include #include #include diff --git a/src/lolcore.vcxproj b/src/lolcore.vcxproj index e10433db..bddbcfa7 100644 --- a/src/lolcore.vcxproj +++ b/src/lolcore.vcxproj @@ -166,7 +166,7 @@ - + @@ -327,7 +327,7 @@ - + @@ -427,4 +427,4 @@ - + \ No newline at end of file diff --git a/src/lolcore.vcxproj.filters b/src/lolcore.vcxproj.filters index a5f18e60..f0c300d4 100644 --- a/src/lolcore.vcxproj.filters +++ b/src/lolcore.vcxproj.filters @@ -147,9 +147,6 @@ mesh - - mesh - gpu @@ -424,6 +421,10 @@ tileset + + + mesh + @@ -510,9 +511,6 @@ mesh - - mesh - application @@ -790,6 +788,10 @@ tileset + + + mesh + diff --git a/src/mesh/primitive.cpp b/src/mesh/primitivemesh.cpp similarity index 100% rename from src/mesh/primitive.cpp rename to src/mesh/primitivemesh.cpp diff --git a/src/mesh/primitive.h b/src/mesh/primitivemesh.h similarity index 100% rename from src/mesh/primitive.h rename to src/mesh/primitivemesh.h