Update boo and GLSL macros

This commit is contained in:
Jack Andersen 2016-02-23 17:18:19 -10:00
parent d76fcf0f5b
commit c424e37fba
3 changed files with 9 additions and 9 deletions

2
hecl/extern/libBoo vendored

@ -1 +1 @@
Subproject commit 74e2f47bcf698801c80cbaf474cf253a76681d8f Subproject commit 478b05ceb7166c105e6a450163aabe7931b9e3fb

View File

@ -87,7 +87,7 @@ std::string GLSL::GenerateVertUniformStruct(unsigned skinSlots, unsigned texMtxs
{ {
if (skinSlots == 0) if (skinSlots == 0)
skinSlots = 1; skinSlots = 1;
std::string retval = HECL::Format("uniform HECLVertUniform\n" std::string retval = HECL::Format("UBINDING0 uniform HECLVertUniform\n"
"{\n" "{\n"
" mat4 mv[%u];\n" " mat4 mv[%u];\n"
" mat4 mvInv[%u];\n" " mat4 mvInv[%u];\n"
@ -107,7 +107,7 @@ void GLSL::reset(const IR& ir, Diagnostics& diag)
std::string GLSL::makeVert(const char* glslVer, unsigned col, unsigned uv, unsigned w, std::string GLSL::makeVert(const char* glslVer, unsigned col, unsigned uv, unsigned w,
unsigned s, unsigned tm) const unsigned s, unsigned tm) const
{ {
std::string retval = std::string(glslVer) + "\n" + std::string retval = std::string(glslVer) + "\n" BOO_GLSL_BINDING_HEAD +
GenerateVertInStruct(col, uv, w) + "\n" + GenerateVertInStruct(col, uv, w) + "\n" +
GenerateVertToFragStruct() + "\n" + GenerateVertToFragStruct() + "\n" +
GenerateVertUniformStruct(s, tm) + GenerateVertUniformStruct(s, tm) +
@ -160,9 +160,9 @@ std::string GLSL::makeFrag(const char* glslVer,
std::string texMapDecl; std::string texMapDecl;
if (m_texMapEnd) if (m_texMapEnd)
texMapDecl = HECL::Format("uniform sampler2D texs[%u];\n", m_texMapEnd); texMapDecl = HECL::Format("TBINDING0 uniform sampler2D texs[%u];\n", m_texMapEnd);
std::string retval = std::string(glslVer) + "\n" + std::string retval = std::string(glslVer) + "\n" BOO_GLSL_BINDING_HEAD +
GenerateVertToFragStruct() + GenerateVertToFragStruct() +
"\nlayout(location=0) out vec4 colorOut;\n" + "\nlayout(location=0) out vec4 colorOut;\n" +
texMapDecl + texMapDecl +
@ -210,9 +210,9 @@ std::string GLSL::makeFrag(const char* glslVer,
std::string texMapDecl; std::string texMapDecl;
if (m_texMapEnd) if (m_texMapEnd)
texMapDecl = HECL::Format("uniform sampler2D texs[%u];\n", m_texMapEnd); texMapDecl = HECL::Format("TBINDING0 uniform sampler2D texs[%u];\n", m_texMapEnd);
std::string retval = std::string(glslVer) + "\n" + std::string retval = std::string(glslVer) + "\n" BOO_GLSL_BINDING_HEAD +
GenerateVertToFragStruct() + GenerateVertToFragStruct() +
"\nlayout(location=0) out vec4 colorOut;\n" + "\nlayout(location=0) out vec4 colorOut;\n" +
texMapDecl + texMapDecl +

View File

@ -35,7 +35,7 @@ struct HECLApplicationCallback : boo::IApplicationCallback
int appMain(boo::IApplication* app) int appMain(boo::IApplication* app)
{ {
/* Setup boo window */ /* Setup boo window */
m_mainWindow = app->newWindow(_S("HECL Test")); m_mainWindow = app->newWindow(_S("HECL Test"), 1);
m_mainWindow->setCallback(&m_windowCb); m_mainWindow->setCallback(&m_windowCb);
boo::ITextureR* renderTex = nullptr; boo::ITextureR* renderTex = nullptr;
@ -75,7 +75,7 @@ struct HECLApplicationCallback : boo::IApplicationCallback
boo::IGraphicsDataFactory* gfxF = m_mainWindow->getLoadContextDataFactory(); boo::IGraphicsDataFactory* gfxF = m_mainWindow->getLoadContextDataFactory();
boo::SWindowRect mainWindowRect = m_mainWindow->getWindowFrame(); boo::SWindowRect mainWindowRect = m_mainWindow->getWindowFrame();
renderTex = gfxF->newRenderTexture(mainWindowRect.size[0], mainWindowRect.size[1], 1); renderTex = gfxF->newRenderTexture(mainWindowRect.size[0], mainWindowRect.size[1]);
/* HECL managers */ /* HECL managers */
HECL::Runtime::FileStoreManager fileMgr(app->getUniqueName()); HECL::Runtime::FileStoreManager fileMgr(app->getUniqueName());