Lots of stuff

This commit is contained in:
elasota
2019-11-11 00:11:59 -05:00
parent 49a35bb15b
commit c8472f7295
406 changed files with 58313 additions and 88 deletions

View File

@@ -0,0 +1,23 @@
#include "GpDisplayDriverFactory.h"
#include "GpDisplayDriverProperties.h"
#include <assert.h>
IGpDisplayDriver *GpDisplayDriverFactory::CreateDisplayDriver(const GpDisplayDriverProperties &properties)
{
assert(properties.m_Type < EGpDisplayDriverType_Count);
if (ms_Registry[properties.m_Type])
return ms_Registry[properties.m_Type](properties);
else
return nullptr;
}
void GpDisplayDriverFactory::RegisterDisplayDriverFactory(EGpDisplayDriverType type, FactoryFunc_t func)
{
assert(type < EGpDisplayDriverType_Count);
ms_Registry[type] = func;
}
GpDisplayDriverFactory::FactoryFunc_t GpDisplayDriverFactory::ms_Registry[EGpDisplayDriverType_Count];