summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-05 19:57:57 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-05 19:57:57 +0000
commit40142ec8cafdcc64595bde3dbf7354140915e88d (patch)
tree872b9b12488efe2cadc192674cebdd99ac5c76f2 /o3d
parentfd1335845040a65fdc9bbf36d0a3704b0476ebd8 (diff)
downloadchromium_src-40142ec8cafdcc64595bde3dbf7354140915e88d.zip
chromium_src-40142ec8cafdcc64595bde3dbf7354140915e88d.tar.gz
chromium_src-40142ec8cafdcc64595bde3dbf7354140915e88d.tar.bz2
o3d: create a gles v2 context for the native gles2 backend
Review URL: http://codereview.chromium.org/3050038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55114 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r--o3d/core/cross/gles2/renderer_gles2.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/o3d/core/cross/gles2/renderer_gles2.cc b/o3d/core/cross/gles2/renderer_gles2.cc
index 272524d..616267c 100644
--- a/o3d/core/cross/gles2/renderer_gles2.cc
+++ b/o3d/core/cross/gles2/renderer_gles2.cc
@@ -1205,7 +1205,13 @@ Renderer::InitStatus RendererGLES2::InitPlatformSpecific(
return INITIALIZATION_ERROR;
}
- EGLContext egl_context = eglCreateContext(egl_display, config, NULL, NULL);
+ static const EGLint egl_context_attributes[] = {
+ EGL_CONTEXT_CLIENT_VERSION, 2,
+ EGL_NONE
+ };
+
+ EGLContext egl_context = eglCreateContext(egl_display, config, NULL,
+ egl_context_attributes);
if (!egl_context) {
DLOG(ERROR) << "eglCreateContext failed.";
eglDestroySurface(egl_display, egl_surface);