From: Steinar H. Gunderson Date: Thu, 20 Mar 2014 23:01:48 +0000 (+0100) Subject: Check for GLES in init_movit(). X-Git-Tag: 1.1~12^2~8 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=70f86335e039280a182119c3055aabeae01713bc;hp=b554dd7bac7b37962d1ee15db4e0fb2e79fe8a57 Check for GLES in init_movit(). This sort of worked by accident already, since 30 was interpreted as desktop OpenGL 3.0, but this is more proper. --- diff --git a/init.cpp b/init.cpp index c5e8113..f6f45a0 100644 --- a/init.cpp +++ b/init.cpp @@ -277,6 +277,21 @@ void measure_roundoff_problems() bool check_extensions() { + // GLES generally doesn't use extensions as actively as desktop OpenGL. + // For now, we say that for GLES, we require GLES 3, which has everything + // we need. + // + // Since we use implicit #version 100, we don't have round(). We will + // fix this at some later stage. + if (!epoxy_is_desktop_gl()) { + if (epoxy_gl_version() >= 30) { + movit_srgb_textures_supported = true; + movit_shader_rounding_supported = false; + } else { + return false; + } + } + // We fundamentally need FBOs and floating-point textures. // FBOs are covered by OpenGL 1.5, and are not an extension there. // Floating-point textures are part of OpenGL 3.0 and newer.