From 70f86335e039280a182119c3055aabeae01713bc Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 21 Mar 2014 00:01:48 +0100 Subject: [PATCH] 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. --- init.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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. -- 2.39.2