From f4f84c6566d99c297cddee3c712e94927f313204 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Wed, 18 Feb 2015 16:49:53 +0100 Subject: Improve the OpenGL context request system --- src/android/mod.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/android') diff --git a/src/android/mod.rs b/src/android/mod.rs index ea93040..72ebda3 100644 --- a/src/android/mod.rs +++ b/src/android/mod.rs @@ -11,7 +11,9 @@ use events::MouseButton; use std::collections::RingBuf; +use Api; use BuilderAttribs; +use GlRequest; pub struct Window { display: ffi::egl::types::EGLDisplay, @@ -157,7 +159,10 @@ impl Window { android_glue::write_log("eglInitialize succeeded"); let use_gles2 = match builder.gl_version { - Some((2, 0)) => true, + GlRequest::Specific(Api::OpenGlEs, (2, _)) => true, + GlRequest::Specific(Api::OpenGlEs, _) => false, + GlRequest::Specific(_, _) => panic!("Only OpenGL ES is supported"), // FIXME: return a result + GlRequest::GlThenGles { opengles_version: (2, _), .. } => true, _ => false, }; -- cgit v1.2.3