+extern class EGLConformant `{ EGLint `}
+ new `{ return (EGLint)0; `}
+ new from_i(val: Int) `{ return (EGLint)val; `}
+ fun to_i: Int `{ return recv; `}
+
+ fun opengl: Bool `{ return recv & EGL_OPENGL_BIT; `}
+ fun with_opengl: EGLConformant `{ return recv | EGL_OPENGL_BIT; `}
+
+ fun opengl_es: Bool `{ return recv & EGL_OPENGL_ES_BIT; `}
+ fun with_opengl_es: EGLConformant `{ return recv | EGL_OPENGL_ES_BIT; `}
+
+ fun opengl_es2: Bool `{ return recv & EGL_OPENGL_ES2_BIT; `}
+ fun with_opengl_es2: EGLConformant `{ return recv | EGL_OPENGL_ES2_BIT; `}
+
+ fun openvg: Bool `{ return recv & EGL_OPENVG_BIT; `}
+ fun with_openvg: EGLConformant `{ return recv | EGL_OPENVG_BIT; `}
+
+ fun to_a: Array[String]
+ do
+ var features = new Array[String]
+ if opengl then features.add("OpenGL")
+ if opengl_es then features.add("OpenGL ES")
+ if opengl_es2 then features.add("OpenGL ES2")
+ if openvg then features.add("OpenVG")
+ return features
+ end
+
+ redef fun to_s do return to_a.join(", ")
+end
+