summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-08-15 15:42:19 +0200
committerZolnai Tamás <tamas.zolnai@collabora.com>2014-08-15 15:42:19 +0200
commit2a8da8a54811a88f38d299b334034adb9dd347e8 (patch)
tree387cd0963cfcd66d38a472ac5e3486bae8c96722
parent971e230a9947036e107f20cc80304b2310ee6be2 (diff)
collada2gltf: fix compatibility issues of *.kmz/*.dae files under linux
It seems under linux we need to specify the version number explicitly, because otherwise shader compiler will use GLSL 1.1 and will fail. Base line is GLSL 1.3 or OpenGL ES 3.0. Change-Id: Ie143275ade8d6989fda055ab96943b25ef220e9d
-rw-r--r--external/collada2gltf/UnpackedTarball_collada2gltf.mk1
-rw-r--r--external/collada2gltf/patches/fix_linux_shader_compiling.patch.113
2 files changed, 14 insertions, 0 deletions
diff --git a/external/collada2gltf/UnpackedTarball_collada2gltf.mk b/external/collada2gltf/UnpackedTarball_collada2gltf.mk
index 15a1a545cdcb..00ef562b74f5 100644
--- a/external/collada2gltf/UnpackedTarball_collada2gltf.mk
+++ b/external/collada2gltf/UnpackedTarball_collada2gltf.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,collada2gltf,\
external/collada2gltf/patches/collada2gltf.new-delete-mismatch.patch.1 \
external/collada2gltf/patches/collada2gltf.fix-memory-leak.patch.1 \
external/collada2gltf/patches/collada2gltf.fix-memory-leak2.patch.1 \
+ external/collada2gltf/patches/fix_linux_shader_compiling.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/collada2gltf/patches/fix_linux_shader_compiling.patch.1 b/external/collada2gltf/patches/fix_linux_shader_compiling.patch.1
new file mode 100644
index 000000000000..a4813c163c66
--- /dev/null
+++ b/external/collada2gltf/patches/fix_linux_shader_compiling.patch.1
@@ -0,0 +1,13 @@
+diff -ur collada2gltf.org/shaders/commonProfileShaders.cpp collada2gltf/shaders/commonProfileShaders.cpp
+--- collada2gltf.org/shaders/commonProfileShaders.cpp 2014-08-15 15:21:51.839323947 +0200
++++ collada2gltf/shaders/commonProfileShaders.cpp 2014-08-15 15:23:36.931327850 +0200
+@@ -367,7 +367,7 @@
+ public:
+
+ GLSLShader(shared_ptr <GLTFProfile> profile) {
+- this->_declarations = "precision highp float;\n";;
++ this->_declarations = "#ifdef GL_ES_VERSION_3_0\n#version 300 es\n#else\n#version 130\n#endif\nprecision highp float;\n";
+ this->_body = "void main(void) {\n";
+ this->_profile = profile;
+ }
+Only in collada2gltf/shaders: commonProfileShaders.cpp~