23 lines
361 B
C++
23 lines
361 B
C++
|
#include "frgbridge.h"
|
||
|
|
||
|
#include "include/Engine.h"
|
||
|
#include <memory>
|
||
|
#include <mutex>
|
||
|
|
||
|
|
||
|
std::unique_ptr<SE::TShaderManager> shaderManager;
|
||
|
|
||
|
|
||
|
SE::TShaderManager& GetShaderManager()
|
||
|
{
|
||
|
static std::once_flag onceFlag;
|
||
|
|
||
|
std::call_once(onceFlag,
|
||
|
[] {
|
||
|
shaderManager = std::make_unique<SE::TShaderManager>();
|
||
|
});
|
||
|
|
||
|
return *shaderManager.get();
|
||
|
}
|
||
|
|