Fixed the GLSL ES version

TRAC #11867 Signed-off-by: Andrew Lewycky Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@154 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 5af6427d
...@@ -630,7 +630,8 @@ static int CPPpragma(yystypepp * yylvalpp) ...@@ -630,7 +630,8 @@ static int CPPpragma(yystypepp * yylvalpp)
return token; return token;
} // CPPpragma } // CPPpragma
#define GL2_VERSION_NUMBER 110 #define ESSL_VERSION_NUMBER 100
#define ESSL_VERSION_STRING "100"
static int CPPversion(yystypepp * yylvalpp) static int CPPversion(yystypepp * yylvalpp)
{ {
...@@ -652,8 +653,8 @@ static int CPPversion(yystypepp * yylvalpp) ...@@ -652,8 +653,8 @@ static int CPPversion(yystypepp * yylvalpp)
yylvalpp->sc_int=atoi(yylvalpp->symbol_name); yylvalpp->sc_int=atoi(yylvalpp->symbol_name);
//SetVersionNumber(yylvalpp->sc_int); //SetVersionNumber(yylvalpp->sc_int);
if (yylvalpp->sc_int != GL2_VERSION_NUMBER) if (yylvalpp->sc_int != ESSL_VERSION_NUMBER)
CPPShInfoLogMsg("Version number not supported by GL2"); CPPShInfoLogMsg("Version number not supported by ESSL");
token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); token = cpp->currentInput->scan(cpp->currentInput, yylvalpp);
...@@ -896,7 +897,7 @@ int MacroExpand(int atom, yystypepp * yylvalpp) ...@@ -896,7 +897,7 @@ int MacroExpand(int atom, yystypepp * yylvalpp)
return 1; return 1;
} }
if (atom == __VERSION__Atom) { if (atom == __VERSION__Atom) {
strcpy(yylvalpp->symbol_name,"100"); strcpy(yylvalpp->symbol_name,ESSL_VERSION_STRING);
yylvalpp->sc_int = atoi(yylvalpp->symbol_name); yylvalpp->sc_int = atoi(yylvalpp->symbol_name);
UngetToken(CPP_INTCONSTANT, yylvalpp); UngetToken(CPP_INTCONSTANT, yylvalpp);
return 1; return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment