mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-07-17 23:25:52 +00:00
31 lines
932 B
C++
31 lines
932 B
C++
#include "Specter/ViewSystem.hpp"
|
|
|
|
namespace Specter
|
|
{
|
|
static LogVisor::LogModule Log("Specter");
|
|
|
|
void ViewSystem::init(boo::IGraphicsDataFactory* factory, FontCache* fcache)
|
|
{
|
|
m_factory = factory;
|
|
switch (factory->platform())
|
|
{
|
|
case boo::IGraphicsDataFactory::Platform::OGL:
|
|
init<boo::GLDataFactory>(static_cast<boo::GLDataFactory*>(factory), fcache);
|
|
break;
|
|
#if _WIN32
|
|
case boo::IGraphicsDataFactory::Platform::D3D11:
|
|
case boo::IGraphicsDataFactory::Platform::D3D12:
|
|
init<boo::ID3DDataFactory>(static_cast<boo::ID3DDataFactory*>(factory), fcache);
|
|
break;
|
|
#elif BOO_HAS_METAL
|
|
case boo::IGraphicsDataFactory::Platform::Metal:
|
|
init<boo::MetalDataFactory>(static_cast<boo::MetalDataFactory*>(factory), fcache);
|
|
break;
|
|
#endif
|
|
default:
|
|
Log.report(LogVisor::FatalError, _S("unable to init view system for %s"), factory->platformName());
|
|
}
|
|
}
|
|
|
|
}
|