From f907b7bebd1085805d93124be5c16de29d3d63f7 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 14 Dec 2015 20:54:41 +0100 Subject: [PATCH] Revert "Add a hack to use #version 110 but keep using 130 features, for the benefit of OS X." This turned out not to work well on OS X after all. This reverts commit e0811ddf51aeb50575fb5f7d9c6e32b92a6bac0d. --- init.cpp | 9 +-------- init.h | 2 +- util.cpp | 7 +------ version.h | 2 +- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/init.cpp b/init.cpp index 733d246..55bddec 100644 --- a/init.cpp +++ b/init.cpp @@ -437,14 +437,7 @@ bool init_movit(const string& data_directory, MovitDebugLevel debug_level) if (get_glsl_version() < 1.30f) { fprintf(stderr, "Movit system requirements: Needs at least GLSL version 1.30 (has version %.1f)\n", get_glsl_version()); - if (get_glsl_version() >= 1.10f) { - fprintf(stderr, "Attempting to continue nevertheless; expect shader compilation issues.\n"); - fprintf(stderr, "Try switching to a core OpenGL context, as especially OS X drivers\n"); - fprintf(stderr, "support newer GLSL versions there.\n"); - movit_shader_model = MOVIT_GLSL_130_AS_110; - } else { - return false; - } + return false; } if (get_glsl_version() < 1.50f) { movit_shader_model = MOVIT_GLSL_130; diff --git a/init.h b/init.h index 89e3ef7..7e1e130 100644 --- a/init.h +++ b/init.h @@ -73,7 +73,7 @@ extern bool movit_timer_queries_supported; // What shader model we are compiling for. This only affects the choice // of a few files (like header.frag); most of the shaders are the same. enum MovitShaderModel { - MOVIT_GLSL_130_AS_110, // Use 1.30 features freely, but use #version 110. + MOVIT_GLSL_110, // No longer in use, but kept until next ABI break in order not to change the enums. MOVIT_GLSL_130, MOVIT_ESSL_300, MOVIT_GLSL_150, diff --git a/util.cpp b/util.cpp index 675b25b..d500399 100644 --- a/util.cpp +++ b/util.cpp @@ -127,12 +127,7 @@ string read_file(const string &filename) string read_version_dependent_file(const string &base, const string &extension) { - if (movit_shader_model == MOVIT_GLSL_130_AS_110) { - string contents = read_file(base + ".130." + extension); - assert(contents.find("#version 130") == 0); - contents[10] = '1'; // Change from 130 to 110. - return contents; - } else if (movit_shader_model == MOVIT_GLSL_130) { + if (movit_shader_model == MOVIT_GLSL_130) { return read_file(base + ".130." + extension); } else if (movit_shader_model == MOVIT_GLSL_150) { return read_file(base + ".150." + extension); diff --git a/version.h b/version.h index 3f863c0..45e4a98 100644 --- a/version.h +++ b/version.h @@ -5,6 +5,6 @@ // changes, even within git versions. There is no specific version // documentation outside the regular changelogs, though. -#define MOVIT_VERSION 15 +#define MOVIT_VERSION 16 #endif // !defined(_MOVIT_VERSION_H) -- 2.39.2