mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-07-05 05:15:53 +00:00
boo D3D lambda syncx
This commit is contained in:
parent
b756005aad
commit
fb7ae9ac87
@ -166,22 +166,22 @@ void TextView::Resources::init(boo::ID3DDataFactory::Context& ctx, FontCache* fc
|
|||||||
{nullptr, nullptr, boo::VertexSemantic::UV4 | boo::VertexSemantic::Instanced, 3},
|
{nullptr, nullptr, boo::VertexSemantic::UV4 | boo::VertexSemantic::Instanced, 3},
|
||||||
{nullptr, nullptr, boo::VertexSemantic::Color | boo::VertexSemantic::Instanced}
|
{nullptr, nullptr, boo::VertexSemantic::Color | boo::VertexSemantic::Instanced}
|
||||||
};
|
};
|
||||||
m_vtxFmt = factory->newVertexFormat(13, vdescs);
|
m_vtxFmt = ctx.newVertexFormat(13, vdescs);
|
||||||
|
|
||||||
ComPtr<ID3DBlob> blobVert;
|
ComPtr<ID3DBlob> blobVert;
|
||||||
ComPtr<ID3DBlob> blobFrag;
|
ComPtr<ID3DBlob> blobFrag;
|
||||||
ComPtr<ID3DBlob> blobPipe;
|
ComPtr<ID3DBlob> blobPipe;
|
||||||
m_regular =
|
m_regular =
|
||||||
factory->newShaderPipeline(VS, FSReg, blobVert, blobFrag, blobPipe, m_vtxFmt,
|
ctx.newShaderPipeline(VS, FSReg, blobVert, blobFrag, blobPipe, m_vtxFmt,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, false, false);
|
boo::Primitive::TriStrips, false, false, false);
|
||||||
|
|
||||||
blobFrag.Reset();
|
blobFrag.Reset();
|
||||||
blobPipe.Reset();
|
blobPipe.Reset();
|
||||||
m_subpixel =
|
m_subpixel =
|
||||||
factory->newShaderPipeline(nullptr, FSSubpixel, blobVert, blobFrag, blobPipe, m_vtxFmt,
|
ctx.newShaderPipeline(nullptr, FSSubpixel, blobVert, blobFrag, blobPipe, m_vtxFmt,
|
||||||
boo::BlendFactor::SrcColor1, boo::BlendFactor::InvSrcColor1,
|
boo::BlendFactor::SrcColor1, boo::BlendFactor::InvSrcColor1,
|
||||||
boo::Primitive::TriStrips, false, false, false);
|
boo::Primitive::TriStrips, false, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -86,7 +86,7 @@ void View::Resources::init(boo::GLDataFactory::Context& ctx, const IThemeData& t
|
|||||||
|
|
||||||
#if _WIN32
|
#if _WIN32
|
||||||
|
|
||||||
void View::Resources::init(boo::ID3DDataFactory* factory, const IThemeData& theme)
|
void View::Resources::init(boo::ID3DDataFactory::Context& ctx, const IThemeData& theme)
|
||||||
{
|
{
|
||||||
static const char* SolidVS =
|
static const char* SolidVS =
|
||||||
"struct VertData\n"
|
"struct VertData\n"
|
||||||
@ -160,34 +160,34 @@ void View::Resources::init(boo::ID3DDataFactory* factory, const IThemeData& them
|
|||||||
{nullptr, nullptr, boo::VertexSemantic::Position4},
|
{nullptr, nullptr, boo::VertexSemantic::Position4},
|
||||||
{nullptr, nullptr, boo::VertexSemantic::Color}
|
{nullptr, nullptr, boo::VertexSemantic::Color}
|
||||||
};
|
};
|
||||||
m_solidVtxFmt = factory->newVertexFormat(2, solidvdescs);
|
m_solidVtxFmt = ctx.newVertexFormat(2, solidvdescs);
|
||||||
|
|
||||||
ComPtr<ID3DBlob> vertBlob;
|
ComPtr<ID3DBlob> vertBlob;
|
||||||
ComPtr<ID3DBlob> fragBlob;
|
ComPtr<ID3DBlob> fragBlob;
|
||||||
ComPtr<ID3DBlob> pipeBlob;
|
ComPtr<ID3DBlob> pipeBlob;
|
||||||
m_solidShader = factory->newShaderPipeline(SolidVS, SolidFS, vertBlob, fragBlob, pipeBlob, m_solidVtxFmt,
|
m_solidShader = ctx.newShaderPipeline(SolidVS, SolidFS, vertBlob, fragBlob, pipeBlob, m_solidVtxFmt,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, false, false);
|
boo::Primitive::TriStrips, false, false, false);
|
||||||
|
|
||||||
boo::VertexElementDescriptor texvdescs[] =
|
boo::VertexElementDescriptor texvdescs[] =
|
||||||
{
|
{
|
||||||
{nullptr, nullptr, boo::VertexSemantic::Position4},
|
{nullptr, nullptr, boo::VertexSemantic::Position4},
|
||||||
{nullptr, nullptr, boo::VertexSemantic::UV4}
|
{nullptr, nullptr, boo::VertexSemantic::UV4}
|
||||||
};
|
};
|
||||||
m_texVtxFmt = factory->newVertexFormat(2, texvdescs);
|
m_texVtxFmt = ctx.newVertexFormat(2, texvdescs);
|
||||||
|
|
||||||
vertBlob.Reset();
|
vertBlob.Reset();
|
||||||
fragBlob.Reset();
|
fragBlob.Reset();
|
||||||
pipeBlob.Reset();
|
pipeBlob.Reset();
|
||||||
m_texShader = factory->newShaderPipeline(TexVS, TexFS, vertBlob, fragBlob, pipeBlob, m_texVtxFmt,
|
m_texShader = ctx.newShaderPipeline(TexVS, TexFS, vertBlob, fragBlob, pipeBlob, m_texVtxFmt,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, false, false);
|
boo::Primitive::TriStrips, false, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#if BOO_HAS_METAL
|
#if BOO_HAS_METAL
|
||||||
|
|
||||||
void View::Resources::init(boo::MetalDataFactory* factory, const IThemeData& theme)
|
void View::Resources::init(boo::MetalDataFactory::Context& ctx, const IThemeData& theme)
|
||||||
{
|
{
|
||||||
static const char* SolidVS =
|
static const char* SolidVS =
|
||||||
"#include <metal_stdlib>\n"
|
"#include <metal_stdlib>\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user