Return correct OpenGL ES version

Since we can create OpenGL ES 3.0 contexts locally now,
we should also be able to retrieve the correct version.

Change-Id: I9154869ddea5951946c8e23e59a00beb042fca8c
Reviewed-on: https://swiftshader-review.googlesource.com/3633
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/libGLESv2/libGLESv2.cpp b/src/OpenGL/libGLESv2/libGLESv2.cpp
index d89fd79..e1ffae8 100644
--- a/src/OpenGL/libGLESv2/libGLESv2.cpp
+++ b/src/OpenGL/libGLESv2/libGLESv2.cpp
@@ -3503,9 +3503,19 @@
 	case GL_RENDERER:

 		return (GLubyte*)"SwiftShader";

 	case GL_VERSION:

-		return (GLubyte*)"OpenGL ES 2.0 SwiftShader " VERSION_STRING;

+	{

+		es2::Context *context = es2::getContext();

+		return (context && (context->getClientVersion() >= 3)) ?

+		       (GLubyte*)"OpenGL ES 3.0 SwiftShader " VERSION_STRING :

+		       (GLubyte*)"OpenGL ES 2.0 SwiftShader " VERSION_STRING;

+	}

 	case GL_SHADING_LANGUAGE_VERSION:

-		return (GLubyte*)"OpenGL ES GLSL ES 1.00 SwiftShader " VERSION_STRING;

+	{

+		es2::Context *context = es2::getContext();

+		return (context && (context->getClientVersion() >= 3)) ?

+		       (GLubyte*)"OpenGL ES GLSL ES 3.00 SwiftShader " VERSION_STRING :

+		       (GLubyte*)"OpenGL ES GLSL ES 1.00 SwiftShader " VERSION_STRING;

+	}

 	case GL_EXTENSIONS:

 	{

 		es2::Context *context = es2::getContext();