// 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;
}
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;
}