X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=init.cpp;h=f6f45a04dde17331b385ec4aca77df8dd6e77fa7;hp=c5e81135dccb1de327883715f735a8e9506be41b;hb=70f86335e039280a182119c3055aabeae01713bc;hpb=b554dd7bac7b37962d1ee15db4e0fb2e79fe8a57 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.