mirror of https://github.com/AxioDL/metaforce.git
GLSL shader binding refactor
This commit is contained in:
parent
6e761b9870
commit
cf09630cdb
|
@ -67,18 +67,19 @@ BOO_GLSL_BINDING_HEAD
|
|||
"}\n";
|
||||
|
||||
static const char* BlockNames[] = {"SpecterViewBlock"};
|
||||
static const char* TexNames[] = {"fontTex"};
|
||||
|
||||
void TextView::Resources::init(boo::GLDataFactory::Context& ctx, FontCache* fcache)
|
||||
{
|
||||
m_fcache = fcache;
|
||||
|
||||
m_regular =
|
||||
ctx.newShaderPipeline(GLSLVS, GLSLFSReg, 1, "fontTex", 1, BlockNames,
|
||||
ctx.newShaderPipeline(GLSLVS, GLSLFSReg, 1, TexNames, 1, BlockNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
|
||||
m_subpixel =
|
||||
ctx.newShaderPipeline(GLSLVS, GLSLFSSubpixel, 1, "fontTex", 1, BlockNames,
|
||||
ctx.newShaderPipeline(GLSLVS, GLSLFSSubpixel, 1, TexNames, 1, BlockNames,
|
||||
boo::BlendFactor::SrcColor1, boo::BlendFactor::InvSrcColor1,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
}
|
||||
|
|
|
@ -75,6 +75,7 @@ BOO_GLSL_BINDING_HEAD
|
|||
"}\n";
|
||||
|
||||
static const char* BlockNames[] = {"SpecterViewBlock"};
|
||||
static const char* TexNames[] = {"tex"};
|
||||
|
||||
void View::Resources::init(boo::GLDataFactory::Context& ctx, const IThemeData& theme)
|
||||
{
|
||||
|
@ -82,7 +83,7 @@ void View::Resources::init(boo::GLDataFactory::Context& ctx, const IThemeData& t
|
|||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
|
||||
m_texShader = ctx.newShaderPipeline(GLSLTexVS, GLSLTexFS, 1, "tex", 1, BlockNames,
|
||||
m_texShader = ctx.newShaderPipeline(GLSLTexVS, GLSLTexFS, 1, TexNames, 1, BlockNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue