aboutsummaryrefslogtreecommitdiffstats
path: root/src/android
diff options
context:
space:
mode:
authorPierre Krieger <pierre.krieger1708@gmail.com>2015-02-18 16:49:53 +0100
committerPierre Krieger <pierre.krieger1708@gmail.com>2015-02-18 17:15:01 +0100
commitf4f84c6566d99c297cddee3c712e94927f313204 (patch)
treef5ec7a833a54ed5371e8470b859dba14c41a553b /src/android
parent8f8c1b71bcb8a41d15f421602fb61b293f62f175 (diff)
downloadglutin-f4f84c6566d99c297cddee3c712e94927f313204.tar.gz
glutin-f4f84c6566d99c297cddee3c712e94927f313204.zip
Improve the OpenGL context request system
Diffstat (limited to 'src/android')
-rw-r--r--src/android/mod.rs7
1 files changed, 6 insertions, 1 deletions
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,
};