demotool/globals.cc

43 lines
997 B
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"
2017-11-03 09:08:19 +01:00
T_OwnPtr< T_FilesWatcher > Globals::watcher_;
T_OwnPtr< T_Window > Globals::window_;
T_OwnPtr< T_Profiler > Globals::profiler_;
T_OwnPtr< T_SyncManager > Globals::sync_;
T_OwnPtr< T_TextureManager > Globals::textures_;
T_OwnPtr< T_ShaderManager > Globals::shaders_;
T_OwnPtr< T_OutputDebugger > Globals::odbg_;
void Globals::Init( )
{
2017-11-03 09:08:19 +01:00
watcher_ = NewOwned< T_FilesWatcher >( );
window_ = NewOwned< T_Window >( );
profiler_ = NewOwned< T_Profiler >( );
sync_ = NewOwned< T_SyncManager >( );
textures_ = NewOwned< T_TextureManager >( );
shaders_ = NewOwned< T_ShaderManager >( );
odbg_ = NewOwned< T_OutputDebugger >( );
}
void Globals::Shutdown( )
{
2017-11-03 09:08:19 +01:00
odbg_.clear( );
shaders_.clear( );
textures_.clear( );
2017-11-04 21:23:50 +01:00
sync_.clear( );
2017-11-03 09:08:19 +01:00
profiler_.clear( );
window_.clear( );
watcher_.clear( );
}