OpenGTA/OpenGTA-win/frgbridge.cpp

23 lines
361 B
C++
Executable File

#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();
}