mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 13:07:42 +00:00
UWP support
This commit is contained in:
@@ -104,9 +104,11 @@ boo::ObjToken<boo::IShaderPipeline> CFluidPlaneShader::Cache::GetOrBuildShader(c
|
||||
{
|
||||
switch (ctx.platform())
|
||||
{
|
||||
#if BOO_HAS_GL
|
||||
case boo::IGraphicsDataFactory::Platform::OpenGL:
|
||||
slot = BuildShader(static_cast<boo::GLDataFactory::Context&>(ctx), info);
|
||||
break;
|
||||
#endif
|
||||
#if _WIN32
|
||||
case boo::IGraphicsDataFactory::Platform::D3D11:
|
||||
case boo::IGraphicsDataFactory::Platform::D3D12:
|
||||
@@ -154,9 +156,11 @@ void CFluidPlaneShader::PrepareBinding(const boo::ObjToken<boo::IShaderPipeline>
|
||||
|
||||
switch (ctx.platform())
|
||||
{
|
||||
#if BOO_HAS_GL
|
||||
case boo::IGraphicsDataFactory::Platform::OpenGL:
|
||||
m_dataBind = BuildBinding(static_cast<boo::GLDataFactory::Context&>(ctx), pipeline, door);
|
||||
break;
|
||||
#endif
|
||||
#if _WIN32
|
||||
case boo::IGraphicsDataFactory::Platform::D3D11:
|
||||
case boo::IGraphicsDataFactory::Platform::D3D12:
|
||||
|
||||
@@ -117,12 +117,14 @@ private:
|
||||
boo::ObjToken<boo::IGraphicsBufferD> m_uniBuf;
|
||||
boo::ObjToken<boo::IShaderDataBinding> m_dataBind;
|
||||
|
||||
#if BOO_HAS_GL
|
||||
static boo::ObjToken<boo::IShaderPipeline> BuildShader(boo::GLDataFactory::Context& ctx,
|
||||
const SFluidPlaneShaderInfo& info);
|
||||
static boo::ObjToken<boo::IShaderPipeline> BuildShader(boo::GLDataFactory::Context& ctx,
|
||||
const SFluidPlaneDoorShaderInfo& info);
|
||||
boo::ObjToken<boo::IShaderDataBinding> BuildBinding(boo::GLDataFactory::Context& ctx,
|
||||
const boo::ObjToken<boo::IShaderPipeline>& pipeline, bool door);
|
||||
#endif
|
||||
#if _WIN32
|
||||
static boo::ObjToken<boo::IShaderPipeline> BuildShader(boo::ID3DDataFactory::Context& ctx,
|
||||
const SFluidPlaneShaderInfo& info);
|
||||
|
||||
@@ -24,9 +24,11 @@ void CLineRendererShaders::Initialize()
|
||||
{
|
||||
switch (ctx.platform())
|
||||
{
|
||||
#if BOO_HAS_GL
|
||||
case boo::IGraphicsDataFactory::Platform::OpenGL:
|
||||
m_bindFactory.reset(Initialize(static_cast<boo::GLDataFactory::Context&>(ctx)));
|
||||
break;
|
||||
#endif
|
||||
#if _WIN32
|
||||
case boo::IGraphicsDataFactory::Platform::D3D11:
|
||||
case boo::IGraphicsDataFactory::Platform::D3D12:
|
||||
|
||||
@@ -35,7 +35,9 @@ private:
|
||||
static std::unique_ptr<IDataBindingFactory> m_bindFactory;
|
||||
|
||||
public:
|
||||
#if BOO_HAS_GL
|
||||
static IDataBindingFactory* Initialize(boo::GLDataFactory::Context& ctx);
|
||||
#endif
|
||||
#if _WIN32
|
||||
static IDataBindingFactory* Initialize(boo::ID3DDataFactory::Context& ctx);
|
||||
#endif
|
||||
|
||||
@@ -58,9 +58,11 @@ CModelShaders::GetShaderExtensions(boo::IGraphicsDataFactory::Platform plat)
|
||||
{
|
||||
switch (plat)
|
||||
{
|
||||
#if BOO_HAS_GL
|
||||
case boo::IGraphicsDataFactory::Platform::OpenGL:
|
||||
case boo::IGraphicsDataFactory::Platform::Vulkan:
|
||||
return GetShaderExtensionsGLSL(plat);
|
||||
#endif
|
||||
#if _WIN32
|
||||
case boo::IGraphicsDataFactory::Platform::D3D11:
|
||||
case boo::IGraphicsDataFactory::Platform::D3D12:
|
||||
|
||||
@@ -33,9 +33,11 @@ public:
|
||||
{
|
||||
switch (ctx.platform())
|
||||
{
|
||||
#if BOO_HAS_GL
|
||||
case boo::IGraphicsDataFactory::Platform::OpenGL:
|
||||
m_bindFactory.reset(ShaderImp::Initialize(static_cast<boo::GLDataFactory::Context&>(ctx)));
|
||||
break;
|
||||
#endif
|
||||
#if _WIN32
|
||||
case boo::IGraphicsDataFactory::Platform::D3D11:
|
||||
case boo::IGraphicsDataFactory::Platform::D3D12:
|
||||
@@ -62,9 +64,11 @@ public:
|
||||
{
|
||||
switch (CGraphics::g_BooFactory->platform())
|
||||
{
|
||||
#if BOO_HAS_GL
|
||||
case boo::IGraphicsDataFactory::Platform::OpenGL:
|
||||
ShaderImp::template Shutdown<boo::GLDataFactory>();
|
||||
break;
|
||||
#endif
|
||||
#if _WIN32
|
||||
case boo::IGraphicsDataFactory::Platform::D3D11:
|
||||
case boo::IGraphicsDataFactory::Platform::D3D12:
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#if BOO_HAS_GL
|
||||
static TMultiBlendShader<_CLS>::IDataBindingFactory* Initialize(boo::GLDataFactory::Context& ctx);
|
||||
#endif
|
||||
#if _WIN32
|
||||
static TMultiBlendShader<_CLS>::IDataBindingFactory* Initialize(boo::ID3DDataFactory::Context& ctx);
|
||||
#endif
|
||||
|
||||
@@ -32,9 +32,11 @@ public:
|
||||
{
|
||||
switch (ctx.platform())
|
||||
{
|
||||
#if BOO_HAS_GL
|
||||
case boo::IGraphicsDataFactory::Platform::OpenGL:
|
||||
m_bindFactory.reset(ShaderImp::Initialize(static_cast<boo::GLDataFactory::Context&>(ctx)));
|
||||
break;
|
||||
#endif
|
||||
#if _WIN32
|
||||
case boo::IGraphicsDataFactory::Platform::D3D11:
|
||||
case boo::IGraphicsDataFactory::Platform::D3D12:
|
||||
@@ -61,9 +63,11 @@ public:
|
||||
{
|
||||
switch (CGraphics::g_BooFactory->platform())
|
||||
{
|
||||
#if BOO_HAS_GL
|
||||
case boo::IGraphicsDataFactory::Platform::OpenGL:
|
||||
ShaderImp::template Shutdown<boo::GLDataFactory>();
|
||||
break;
|
||||
#endif
|
||||
#if _WIN32
|
||||
case boo::IGraphicsDataFactory::Platform::D3D11:
|
||||
case boo::IGraphicsDataFactory::Platform::D3D12:
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#if BOO_HAS_GL
|
||||
static TShader<_CLS>::IDataBindingFactory* Initialize(boo::GLDataFactory::Context& ctx);
|
||||
#endif
|
||||
#if _WIN32
|
||||
static TShader<_CLS>::IDataBindingFactory* Initialize(boo::ID3DDataFactory::Context& ctx);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user