Kaydet (Commit) 2a8da8a5 authored tarafından Zolnai Tamás's avatar Zolnai Tamás

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
üst 971e230a
...@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,collada2gltf,\ ...@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,collada2gltf,\
external/collada2gltf/patches/collada2gltf.new-delete-mismatch.patch.1 \ external/collada2gltf/patches/collada2gltf.new-delete-mismatch.patch.1 \
external/collada2gltf/patches/collada2gltf.fix-memory-leak.patch.1 \ external/collada2gltf/patches/collada2gltf.fix-memory-leak.patch.1 \
external/collada2gltf/patches/collada2gltf.fix-memory-leak2.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: # vim: set noet sw=4 ts=4:
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~
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment