Return correct GL version and GLSL ES version strings when we are running in an ES3 context.

TRAC #22865 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2297 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 302df74c
...@@ -4393,9 +4393,23 @@ const GLubyte* __stdcall glGetString(GLenum name) ...@@ -4393,9 +4393,23 @@ const GLubyte* __stdcall glGetString(GLenum name)
case GL_RENDERER: case GL_RENDERER:
return (GLubyte*)((context != NULL) ? context->getRendererString() : "ANGLE"); return (GLubyte*)((context != NULL) ? context->getRendererString() : "ANGLE");
case GL_VERSION: case GL_VERSION:
return (GLubyte*)"OpenGL ES 2.0 (ANGLE " VERSION_STRING ")"; if (context->getClientVersion() == 2)
{
return (GLubyte*)"OpenGL ES 2.0 (ANGLE " VERSION_STRING ")";
}
else
{
return (GLubyte*)"OpenGL ES 3.0 (ANGLE " VERSION_STRING ")";
}
case GL_SHADING_LANGUAGE_VERSION: case GL_SHADING_LANGUAGE_VERSION:
return (GLubyte*)"OpenGL ES GLSL ES 1.00 (ANGLE " VERSION_STRING ")"; if (context->getClientVersion() == 2)
{
return (GLubyte*)"OpenGL ES GLSL ES 1.00 (ANGLE " VERSION_STRING ")";
}
else
{
return (GLubyte*)"OpenGL ES GLSL ES 3.00 (ANGLE " VERSION_STRING ")";
}
case GL_EXTENSIONS: case GL_EXTENSIONS:
return (GLubyte*)((context != NULL) ? context->getCombinedExtensionsString() : ""); return (GLubyte*)((context != NULL) ? context->getCombinedExtensionsString() : "");
default: default:
......
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