mirror of https://github.com/AxioDL/metaforce.git
OS X fixes
This commit is contained in:
parent
11dfa963b5
commit
46916d6fac
|
@ -437,7 +437,8 @@ void TextView::draw(boo::IGraphicsCommandQueue* gfxQ)
|
||||||
}
|
}
|
||||||
gfxQ->setShaderDataBinding(m_shaderBinding);
|
gfxQ->setShaderDataBinding(m_shaderBinding);
|
||||||
gfxQ->setDrawPrimitive(boo::Primitive::TriStrips);
|
gfxQ->setDrawPrimitive(boo::Primitive::TriStrips);
|
||||||
gfxQ->drawInstances(0, 4, m_glyphs.size());
|
if (m_glyphs.size())
|
||||||
|
gfxQ->drawInstances(0, 4, m_glyphs.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -145,12 +145,12 @@ void View::System::init(boo::ID3DDataFactory* factory)
|
||||||
" return tex.Sample(samp, vtf.uv);\n"
|
" return tex.Sample(samp, vtf.uv);\n"
|
||||||
"}\n";
|
"}\n";
|
||||||
|
|
||||||
boo::VertexElementDescriptor vdescs[] =
|
boo::VertexElementDescriptor solidvdescs[] =
|
||||||
{
|
{
|
||||||
{nullptr, nullptr, boo::VertexSemantic::Position4},
|
{nullptr, nullptr, boo::VertexSemantic::Position4},
|
||||||
{nullptr, nullptr, boo::VertexSemantic::Color | boo::VertexSemantic::Instanced}
|
{nullptr, nullptr, boo::VertexSemantic::Color | boo::VertexSemantic::Instanced}
|
||||||
};
|
};
|
||||||
m_solidVtxFmt = factory->newVertexFormat(2, vdescs);
|
m_solidVtxFmt = factory->newVertexFormat(2, solidvdescs);
|
||||||
|
|
||||||
ComPtr<ID3DBlob> vertBlob;
|
ComPtr<ID3DBlob> vertBlob;
|
||||||
ComPtr<ID3DBlob> fragBlob;
|
ComPtr<ID3DBlob> fragBlob;
|
||||||
|
@ -159,12 +159,12 @@ void View::System::init(boo::ID3DDataFactory* factory)
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
false, false, false);
|
false, false, false);
|
||||||
|
|
||||||
boo::VertexElementDescriptor vdescs[] =
|
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, vdescs);
|
m_texVtxFmt = factory->newVertexFormat(2, texvdescs);
|
||||||
|
|
||||||
vertBlob.Reset();
|
vertBlob.Reset();
|
||||||
fragBlob.Reset();
|
fragBlob.Reset();
|
||||||
|
@ -249,23 +249,23 @@ void View::System::init(boo::MetalDataFactory* factory)
|
||||||
" return tex.sample(samp, vtf.uv);\n"
|
" return tex.sample(samp, vtf.uv);\n"
|
||||||
"}\n";
|
"}\n";
|
||||||
|
|
||||||
boo::VertexElementDescriptor vdescs[] =
|
boo::VertexElementDescriptor solidvdescs[] =
|
||||||
{
|
{
|
||||||
{nullptr, nullptr, boo::VertexSemantic::Position4},
|
{nullptr, nullptr, boo::VertexSemantic::Position4},
|
||||||
{nullptr, nullptr, boo::VertexSemantic::Color | boo::VertexSemantic::Instanced}
|
{nullptr, nullptr, boo::VertexSemantic::Color | boo::VertexSemantic::Instanced}
|
||||||
};
|
};
|
||||||
m_solidVtxFmt = factory->newVertexFormat(2, vdescs);
|
m_solidVtxFmt = factory->newVertexFormat(2, solidvdescs);
|
||||||
|
|
||||||
m_solidShader = factory->newShaderPipeline(SolidVS, SolidFS, m_solidVtxFmt, 1,
|
m_solidShader = factory->newShaderPipeline(SolidVS, SolidFS, m_solidVtxFmt, 1,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
false, false, false);
|
false, false, false);
|
||||||
|
|
||||||
boo::VertexElementDescriptor vdescs[] =
|
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, vdescs);
|
m_texVtxFmt = factory->newVertexFormat(2, texvdescs);
|
||||||
|
|
||||||
m_texShader = factory->newShaderPipeline(TexVS, TexFS, m_texVtxFmt, 1,
|
m_texShader = factory->newShaderPipeline(TexVS, TexFS, m_texVtxFmt, 1,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
|
|
Loading…
Reference in New Issue