From a8b8cedb1b72746abb63b266568408162f863567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 23 Mar 2015 16:14:40 -0700 Subject: [PATCH] shaderc: Fixed ESSL build. --- tools/shaderc/shaderc.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/shaderc/shaderc.cpp b/tools/shaderc/shaderc.cpp index e5a02c66..f25a0382 100644 --- a/tools/shaderc/shaderc.cpp +++ b/tools/shaderc/shaderc.cpp @@ -845,7 +845,7 @@ int main(int _argc, const char* _argv[]) preprocessor.setDefaultDefine("BGFX_SHADER_TYPE_VERTEX"); char glslDefine[128]; - bx::snprintf(glslDefine, BX_COUNTOF(glslDefine), "BGFX_SHADER_LANGUAGE_GLSL=%d", glsl); + bx::snprintf(glslDefine, BX_COUNTOF(glslDefine), "BGFX_SHADER_LANGUAGE_GLSL=%d", essl ? 1 : glsl); if (0 == bx::stricmp(platform, "android") ) { @@ -1155,7 +1155,8 @@ int main(int _argc, const char* _argv[]) } else { - if (0 != glsl) + if (0 != glsl + || 0 != essl) { } else @@ -1269,7 +1270,8 @@ int main(int _argc, const char* _argv[]) bx::write(writer, BGFX_CHUNK_MAGIC_CSH); bx::write(writer, outputHash); - if (0 != glsl) + if (0 != glsl + || 0 != essl) { std::string code;