2017-10-04 11:20:27 +02:00
|
|
|
#include "externals.hh"
|
|
|
|
#include "globals.hh"
|
|
|
|
|
|
|
|
#include "filewatcher.hh"
|
|
|
|
#include "profiling.hh"
|
|
|
|
#include "texture.hh"
|
|
|
|
#include "shaders.hh"
|
|
|
|
#include "window.hh"
|
2017-10-06 14:29:01 +02:00
|
|
|
#include "odbg.hh"
|
2017-10-30 18:29:52 +01:00
|
|
|
#include "sync.hh"
|
2017-10-04 11:20:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
std::unique_ptr< T_FilesWatcher > Globals::watcher_;
|
|
|
|
std::unique_ptr< T_Window > Globals::window_;
|
|
|
|
std::unique_ptr< T_Profiler > Globals::profiler_;
|
2017-10-30 18:29:52 +01:00
|
|
|
std::unique_ptr< T_SyncManager > Globals::sync_;
|
2017-10-04 11:20:27 +02:00
|
|
|
std::unique_ptr< T_TextureManager > Globals::textures_;
|
|
|
|
std::unique_ptr< T_ShaderManager > Globals::shaders_;
|
2017-10-06 14:29:01 +02:00
|
|
|
std::unique_ptr< T_OutputDebugger > Globals::odbg_;
|
2017-10-04 11:20:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
void Globals::Init( )
|
|
|
|
{
|
|
|
|
watcher_ = std::make_unique< T_FilesWatcher >( );
|
|
|
|
window_ = std::make_unique< T_Window >( );
|
|
|
|
profiler_ = std::make_unique< T_Profiler >( );
|
2017-10-30 18:29:52 +01:00
|
|
|
sync_ = std::make_unique< T_SyncManager >( );
|
2017-10-04 11:20:27 +02:00
|
|
|
textures_ = std::make_unique< T_TextureManager >( );
|
|
|
|
shaders_ = std::make_unique< T_ShaderManager >( );
|
2017-10-06 14:29:01 +02:00
|
|
|
odbg_ = std::make_unique< T_OutputDebugger >( );
|
2017-10-04 11:20:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void Globals::Shutdown( )
|
|
|
|
{
|
2017-10-06 14:29:01 +02:00
|
|
|
odbg_.reset( );
|
2017-10-04 11:20:27 +02:00
|
|
|
shaders_.reset( );
|
|
|
|
textures_.reset( );
|
|
|
|
profiler_.reset( );
|
|
|
|
window_.reset( );
|
|
|
|
watcher_.reset( );
|
|
|
|
}
|