X-Git-Url: http://nitlanguage.org diff --git a/lib/gamnit/display_android.nit b/lib/gamnit/display_android.nit index 6b069d3..d198790 100644 --- a/lib/gamnit/display_android.nit +++ b/lib/gamnit/display_android.nit @@ -14,11 +14,13 @@ # Gamnit display implementation for Android # -# Generated APK files require OpenGL ES 2.0. +# Gamnit apps on Android require OpenGL ES 3.0 because, even if it uses only +# the OpenGL ES 2.0 API, the default shaders have more than 8 vertex attributes. +# OpenGL ES 3.0 ensures at least 8 vertex attributes, while 2.0 ensures only 4. # -# This modules uses `android::native_app_glue` and the Android NDK. +# This module relies on `android::native_app_glue` and the Android NDK. module display_android is - android_manifest """""" + android_manifest """""" end import ::android::game @@ -37,9 +39,10 @@ redef class GamnitDisplay setup_egl_display native_display # We need 8 bits per color for selection by color - select_egl_config(red_bits, green_bits, blue_bits, 0, 8, 0, 0) + select_egl_config(red_bits, green_bits, blue_bits, 0, 8, 0) var format = egl_config.attribs(egl_display).native_visual_id + assert not native_window.address_is_null native_window.set_buffers_geometry(0, 0, format) setup_egl_context native_window