]> git.sesse.net Git - movit/commitdiff
Revert "Add a hack to use #version 110 but keep using 130 features, for the benefit...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 14 Dec 2015 19:54:41 +0000 (20:54 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 14 Dec 2015 19:55:23 +0000 (20:55 +0100)
This turned out not to work well on OS X after all.

This reverts commit e0811ddf51aeb50575fb5f7d9c6e32b92a6bac0d.

init.cpp
init.h
util.cpp
version.h

index 733d24689b5f5c4f2ef56135a32030e92fa9738f..55bddece75f74dc3a3a726a63e0cdd52baf454f7 100644 (file)
--- 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 89e3ef70c6b538494b218339995e891b0aa712ce..7e1e13028b35bd6a0069c45828df88f7133b535f 100644 (file)
--- 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,
index 675b25b4940c3d9a9048d3d4488220340b31817b..d50039993bafc08853fe1278803f053212521f71 100644 (file)
--- 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);
index 3f863c00cc71745353000acb16c3c8d4d6db50d4..45e4a98bc956995cf009b495a24bb200e49bf9db 100644 (file)
--- 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)