mirror of
https://github.com/gwm17/Specter.git
synced 2024-11-22 10:18:50 -05:00
Update for use with predefined entry point
This commit is contained in:
parent
40a3171da8
commit
63dda4facd
|
@ -24,7 +24,7 @@ target_include_directories(SpecProject PUBLIC
|
|||
)
|
||||
|
||||
target_sources(SpecProject PRIVATE
|
||||
./src/main.cpp
|
||||
./src/SPSApp.cpp
|
||||
./src/MassMap.cpp
|
||||
./src/MassMap.h
|
||||
./src/SPSAnalysisStage.cpp
|
||||
|
|
9
SpecProject/imgui_log.txt
Normal file
9
SpecProject/imgui_log.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
(?)
|
||||
[ Copy "Hello, world!" to clipboard ]
|
||||
### Window options ###
|
||||
### Widgets ###
|
||||
### Layout & Scrolling ###
|
||||
### Popups & Modal windows ###
|
||||
### Tables & Columns ###
|
||||
### Filtering ###
|
||||
### Inputs, Navigation & Focus ###
|
29
SpecProject/src/SPSApp.cpp
Normal file
29
SpecProject/src/SPSApp.cpp
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
main.cpp
|
||||
Entry point for the example SpecProject. Also contains example of a simple user Specter::Application.
|
||||
|
||||
GWM -- Feb 2022
|
||||
*/
|
||||
#include "Specter.h"
|
||||
#include "SPSAnalysisStage.h"
|
||||
#include "SPSInputLayer.h"
|
||||
|
||||
//Including this inserts the predefined main function for Specter projects
|
||||
//Can only be included once per project!
|
||||
#include "Specter/Core/EntryPoint.h"
|
||||
|
||||
//User application class. Pushes user analysis stages.
|
||||
class SPSApp : public Specter::Application
|
||||
{
|
||||
public:
|
||||
SPSApp(const Specter::ApplicationArgs& args) :
|
||||
Specter::Application(args)
|
||||
{
|
||||
PushLayer(new Specter::SPSInputLayer(m_manager));
|
||||
//PushLayer(new Navigator::TestServerLayer());
|
||||
PushAnalysisStage(new Specter::SPSAnalysisStage(m_manager));
|
||||
}
|
||||
};
|
||||
|
||||
//Define the creation function to make our user application
|
||||
Specter::Application* Specter::CreateApplication(const ApplicationArgs& args) { return new SPSApp(args); }
|
|
@ -1,49 +0,0 @@
|
|||
/*
|
||||
main.cpp
|
||||
Entry point for the example NavProject. Also contains example of a simple user Navigator::Application.
|
||||
|
||||
GWM -- Feb 2022
|
||||
*/
|
||||
#include "Specter.h"
|
||||
#include "SPSAnalysisStage.h"
|
||||
#include "SPSInputLayer.h"
|
||||
#include <filesystem>
|
||||
|
||||
//User application class. Pushes user analysis stages.
|
||||
class SPSApp : public Specter::Application
|
||||
{
|
||||
public:
|
||||
SPSApp(const Specter::ApplicationArgs& args) :
|
||||
Specter::Application(args)
|
||||
{
|
||||
PushLayer(new Specter::SPSInputLayer(m_manager));
|
||||
//PushLayer(new Navigator::TestServerLayer());
|
||||
PushAnalysisStage(new Specter::SPSAnalysisStage(m_manager));
|
||||
}
|
||||
};
|
||||
|
||||
//Define the creation function to make our user application
|
||||
Specter::Application* Specter::CreateApplication(const ApplicationArgs& args) { return new SPSApp(args); }
|
||||
|
||||
//Make sure to initialize log BEFORE creating application.
|
||||
int main(int argc, const char** argv)
|
||||
{
|
||||
Specter::Logger::Init();
|
||||
SPEC_INFO("Logger Initialized");
|
||||
|
||||
Specter::ApplicationArgs args;
|
||||
args.name = "SPS Specter";
|
||||
args.runtimePath = std::filesystem::current_path();
|
||||
|
||||
SPEC_PROFILE_BEGIN_SESSION("Startup", "navprofile_startup.json");
|
||||
auto app = Specter::CreateApplication(args);
|
||||
SPEC_PROFILE_END_SESSION();
|
||||
|
||||
SPEC_PROFILE_BEGIN_SESSION("Runtime", "navprofile_runtime.json");
|
||||
app->Run();
|
||||
SPEC_PROFILE_END_SESSION();
|
||||
|
||||
SPEC_PROFILE_BEGIN_SESSION("Shutdown", "navprofile_shutdown.json");
|
||||
delete app;
|
||||
SPEC_PROFILE_END_SESSION();
|
||||
}
|
Loading…
Reference in New Issue
Block a user