demotool/globals.cc

42 lines
1.1 KiB
C++
Raw Normal View History

#include "externals.hh"
#include "globals.hh"
#include "filewatcher.hh"
#include "profiling.hh"
#include "texture.hh"
#include "shaders.hh"
#include "window.hh"
#include "odbg.hh"
2017-10-30 18:29:52 +01:00
#include "sync.hh"
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_;
std::unique_ptr< T_TextureManager > Globals::textures_;
std::unique_ptr< T_ShaderManager > Globals::shaders_;
std::unique_ptr< T_OutputDebugger > Globals::odbg_;
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 >( );
textures_ = std::make_unique< T_TextureManager >( );
shaders_ = std::make_unique< T_ShaderManager >( );
odbg_ = std::make_unique< T_OutputDebugger >( );
}
void Globals::Shutdown( )
{
odbg_.reset( );
shaders_.reset( );
textures_.reset( );
profiler_.reset( );
window_.reset( );
watcher_.reset( );
}