diff options
Diffstat (limited to 'Source/ThirdParty/ANGLE/src/compiler/CodeGenGLSL.cpp')
-rw-r--r-- | Source/ThirdParty/ANGLE/src/compiler/CodeGenGLSL.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/ThirdParty/ANGLE/src/compiler/CodeGenGLSL.cpp b/Source/ThirdParty/ANGLE/src/compiler/CodeGenGLSL.cpp index d140b37..226bf8f 100644 --- a/Source/ThirdParty/ANGLE/src/compiler/CodeGenGLSL.cpp +++ b/Source/ThirdParty/ANGLE/src/compiler/CodeGenGLSL.cpp @@ -5,15 +5,24 @@ // #include "compiler/TranslatorGLSL.h" +#include "compiler/TranslatorESSL.h" // // This function must be provided to create the actual // compile object used by higher level code. It returns // a subclass of TCompiler. // -TCompiler* ConstructCompiler(ShShaderType type, ShShaderSpec spec) +TCompiler* ConstructCompiler( + ShShaderType type, ShShaderSpec spec, ShShaderOutput output) { - return new TranslatorGLSL(type, spec); + switch (output) { + case SH_GLSL_OUTPUT: + return new TranslatorGLSL(type, spec); + case SH_ESSL_OUTPUT: + return new TranslatorESSL(type, spec); + default: + return NULL; + } } // |