]> git.sesse.net Git - movit/commitdiff
Merge branch 'epoxy' of ssh://pannekake.samfundet.no/srv/git.sesse.net/www/movit...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 23 Mar 2014 11:41:46 +0000 (12:41 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 23 Mar 2014 11:41:46 +0000 (12:41 +0100)
1  2 
init.cpp

diff --combined init.cpp
index 4b8c970df5f705fc372ed59effd732bab2fc0e95,b4e69b0f6d444c03eeef24125a357198b03fb89d..c37614e4c58de3e3be37ea93f804e2aeace978ea
+++ b/init.cpp
@@@ -283,10 -283,13 +283,10 @@@ 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;
 +                      movit_shader_rounding_supported = true;
                } else {
                        return false;
                }
@@@ -359,6 -362,17 +359,17 @@@ double get_glsl_version(
        return glsl_version;
  }
  
+ void APIENTRY debug_callback(GLenum source,
+                              GLenum type,
+                              GLuint id,
+                              GLenum severity,
+                              GLsizei length,
+                              const char *message,
+                              const void *userParam)
+ {
+       printf("Debug: %s\n", message);
+ }
  }  // namespace
  
  bool init_movit(const string& data_directory, MovitDebugLevel debug_level)
        glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
        glDisable(GL_DITHER);
  
+       // You can turn this on if you want detailed debug messages from the driver.
+       // You should probably also ask for a debug context (see gtest_sdl_main.cpp),
+       // or you might not get much data back.
+       // glDebugMessageCallbackARB(callback, NULL);
+       // glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, 0, GL_TRUE);
        if (!check_extensions()) {
                return false;
        }