summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-07-14 12:07:06 +0200
committerMichael Meeks <michael.meeks@collabora.com>2014-07-14 15:15:32 +0100
commitb3af0dbd159c251480dc761a7a00204a3ad74ecb (patch)
tree24933285b2f040c23a646f4fe6934b13c9c19c58
parent7aa2b94ac57b7c99e1e45d5f652a423ee603dd55 (diff)
Update libgltf: various fixes, memory usage optimization (second try)
Fixes in the new tarball (beside the upstreamed bug fixes): - In walkthrough mode camera is moved relative to the current camera position and not relative to the initial camera position. - The right FPS numbers are displayed under Linux. - Some memory optimization to avoid running out of memory in case of huge models. - Other freedesktop bugs: fdo#81205, fdo#81207, fdo#81250 Reviewed-on: https://gerrit.libreoffice.org/10274 Reviewed-by: Zolnai Tamás <zolnaitamas2000@gmail.com> Tested-by: Zolnai Tamás <zolnaitamas2000@gmail.com> (cherry picked from commit 11b328103f9184b98a822577aaac18d1cdbc5868) Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Conflicts: download.lst external/libgltf/UnpackedTarball_libgltf.mk Change-Id: Ie0f65be3312688196fcca634eb396c577f991073
-rw-r--r--Makefile.fetch3
-rw-r--r--download.lst2
-rw-r--r--external/libgltf/UnpackedTarball_libgltf.mk16
-rw-r--r--external/libgltf/patches/comma_at_end_of_enumerator_list.patch51
-rw-r--r--external/libgltf/patches/compiler_error_fixes.patch41
-rw-r--r--external/libgltf/patches/extend_get_bitmap_for_rgba_ones.patch76
-rw-r--r--external/libgltf/patches/extra_semicolon.patch18
-rw-r--r--external/libgltf/patches/fix_package_file.patch13
-rw-r--r--external/libgltf/patches/init_scene_set_handle.patch80
-rw-r--r--external/libgltf/patches/libgltf_configure.patch61
-rw-r--r--external/libgltf/patches/move_fps_closer_to_the_corner.patch12
-rw-r--r--external/libgltf/patches/no_animation_in_orbit_mode.patch43
-rw-r--r--external/libgltf/patches/no_effect_of_set_looping.patch14
-rw-r--r--external/libgltf/patches/remove_config_h_in_dependencies.patch12
-rw-r--r--external/libgltf/patches/walkthrough_mode_affects_orbit_mode_unexpectedly.patch12
-rw-r--r--external/libgltf/patches/wrong_animation_state_when_set_time_to_null.patch12
-rw-r--r--external/libgltf/patches/wrong_duration_caused_by_uninitialized_member.patch13
-rw-r--r--external/libgltf/patches/wrong_media_time_at_first_run_caused_by_uninitilized_member.patch11
-rw-r--r--external/libgltf/patches/wrong_media_time_caused_by_missing_fmod.patch14
19 files changed, 3 insertions, 501 deletions
diff --git a/Makefile.fetch b/Makefile.fetch
index 204c8f89a953..ffb9d66ee350 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -156,7 +156,6 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
$(call fetch_Optional,LIBATOMIC_OPS,LIBATOMIC_OPS_TARBALL) \
$(call fetch_Optional,LIBEOT,LIBEOT_TARBALL) \
$(call fetch_Optional,LIBEXTTEXTCAT,LIBEXTTEXTCAT_TARBALL) \
- $(call fetch_Optional,LIBGLTF,LIBGLTF_TARBALL) \
$(call fetch_Optional,LIBLANGTAG,LANGTAGREG_TARBALL) \
$(call fetch_Optional,LIBLANGTAG,LIBLANGTAG_TARBALL) \
$(call fetch_Optional,LIBPNG,PNG_TARBALL) \
@@ -235,6 +234,8 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
$(call fetch_Optional,MOZ,$(MOZ_ZIP_LIB)) \
$(call fetch_Optional,MOZ,$(MOZ_ZIP_RUNTIME)) \
,$(call fetch_Download_item_unchecked,http://dev-www.libreoffice.org/mozilla,$(item)))
+ $(if $(call fetch_Optional,LIBGLTF,LIBGLTF_TARBALL) \
+ , $(call fetch_Download_item,http://dev-www.libreoffice.org/src/libgltf,$(call fetch_Optional,LIBGLTF,LIBGLTF_TARBALL)))
@mkdir -p $(dir $@) && touch $@
# vim: set noet sw=4 ts=4:
diff --git a/download.lst b/download.lst
index f4c38b5fdb5d..896646e58bf2 100644
--- a/download.lst
+++ b/download.lst
@@ -87,7 +87,7 @@ export LIBATOMIC_OPS_TARBALL := libatomic_ops-7_2d.zip
export LIBEOT_MD5SUM := aa24f5dd2a2992f4a116aa72af817548
export LIBEOT_TARBALL := libeot-0.01.tar.bz2
export LIBEXTTEXTCAT_TARBALL := ae330b9493bd4503ac390106ff6060d7-libexttextcat-3.4.3.tar.bz2
-export LIBGLTF_TARBALL := 9c8d3455e0d8ef51269784e9a473feeb-libgltf.tar.bz2
+export LIBGLTF_TARBALL := 3d9ea1f2828c46f8ba94b88a87b3326d-libgltf-0.0.0.tar.bz2
export LIBLANGTAG_TARBALL := 36271d3fa0d9dec1632029b6d7aac925-liblangtag-0.5.1.tar.bz2
export LIBXMLSEC_TARBALL := 1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
export LIBXML_TARBALL := 9c0cfef285d5c4a5c80d00904ddab380-libxml2-2.9.1.tar.gz
diff --git a/external/libgltf/UnpackedTarball_libgltf.mk b/external/libgltf/UnpackedTarball_libgltf.mk
index 2e027ad2a47f..176c1d15246b 100644
--- a/external/libgltf/UnpackedTarball_libgltf.mk
+++ b/external/libgltf/UnpackedTarball_libgltf.mk
@@ -16,22 +16,6 @@ $(eval $(call gb_UnpackedTarball_set_patchflags,libgltf,--binary))
$(eval $(call gb_UnpackedTarball_set_patchlevel,libgltf,1))
$(eval $(call gb_UnpackedTarball_add_patches,libgltf,\
- external/libgltf/patches/libgltf_configure.patch \
- external/libgltf/patches/remove_config_h_in_dependencies.patch \
- external/libgltf/patches/init_scene_set_handle.patch \
- external/libgltf/patches/extend_get_bitmap_for_rgba_ones.patch \
- external/libgltf/patches/wrong_duration_caused_by_uninitialized_member.patch \
- external/libgltf/patches/wrong_media_time_caused_by_missing_fmod.patch \
- external/libgltf/patches/wrong_animation_state_when_set_time_to_null.patch \
- external/libgltf/patches/no_effect_of_set_looping.patch \
- external/libgltf/patches/wrong_media_time_at_first_run_caused_by_uninitilized_member.patch \
- external/libgltf/patches/no_animation_in_orbit_mode.patch \
- external/libgltf/patches/walkthrough_mode_affects_orbit_mode_unexpectedly.patch \
- external/libgltf/patches/move_fps_closer_to_the_corner.patch \
- external/libgltf/patches/compiler_error_fixes.patch \
- external/libgltf/patches/fix_package_file.patch \
- external/libgltf/patches/comma_at_end_of_enumerator_list.patch \
- external/libgltf/patches/extra_semicolon.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/libgltf/patches/comma_at_end_of_enumerator_list.patch b/external/libgltf/patches/comma_at_end_of_enumerator_list.patch
deleted file mode 100644
index 7e336f7de841..000000000000
--- a/external/libgltf/patches/comma_at_end_of_enumerator_list.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-diff -ur libgltf.org/src/Common.h libgltf/src/Common.h
---- libgltf.org/src/Common.h 2014-06-28 12:17:56.880068394 +0200
-+++ libgltf/src/Common.h 2014-06-28 12:22:32.940078647 +0200
-@@ -86,7 +86,7 @@
- DataType_FLOAT_MAT3 = 0x8B5B,
- DataType_FLOAT_MAT4 = 0x8B5C,
- DataType_SAMPLER_2D = 0x8B5E,
-- DataType_SAMPLER_CUBE = 0x8B60,
-+ DataType_SAMPLER_CUBE = 0x8B60
- } DataType_E;
-
- class Attribute
-@@ -119,7 +119,7 @@
- LightSource_DIRECTIONAL = 0x1,
- LightSource_POINT = 0x2,
- LightSource_SPOT = 0x3,
-- LightSource_AMBIET = 0x4,
-+ LightSource_AMBIET = 0x4
- } LightSourceType_E;
-
- class Light
-@@ -252,7 +252,7 @@
- TextureType_DISPLACEMENT = 0x9,
- TextureType_LIGHTMAP = 0xA,
- TextureType_REFLECTION = 0xB,
-- TextureType_UNKNOWN = 0xC,
-+ TextureType_UNKNOWN = 0xC
- } TextureType_E;
-
- class MaterialProperty
-@@ -449,7 +449,7 @@
- NodeType_Node = 0x1,
- NodeType_Mesh = 0x2,
- NodeType_Camera = 0x4,
-- NodeType_Light = 0x8,
-+ NodeType_Light = 0x8
- } NodeType_E;
-
- class Node
-diff -ur libgltf.org/src/Texture.h libgltf/src/Texture.h
---- libgltf.org/src/Texture.h 2014-06-28 12:17:56.880068394 +0200
-+++ libgltf/src/Texture.h 2014-06-28 12:18:19.740069243 +0200
-@@ -24,7 +24,7 @@
- TEXTURE_FILTER_MIN_BILINEAR,
- TEXTURE_FILTER_MIN_NEAREST_MIPMAP,
- TEXTURE_FILTER_MIN_BILINEAR_MIPMAP,
-- TEXTURE_FILTER_MIN_TRILINEAR,
-+ TEXTURE_FILTER_MIN_TRILINEAR
- };
-
- class Texture
diff --git a/external/libgltf/patches/compiler_error_fixes.patch b/external/libgltf/patches/compiler_error_fixes.patch
deleted file mode 100644
index a2ff1728c72f..000000000000
--- a/external/libgltf/patches/compiler_error_fixes.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-diff -ur libgltf.org/src/Camera.cpp libgltf/src/Camera.cpp
---- libgltf.org/src/Camera.cpp 2014-06-26 15:49:57.807687346 +0200
-+++ libgltf/src/Camera.cpp 2014-06-26 15:50:46.195685296 +0200
-@@ -161,7 +161,7 @@
- }
- else
- {
-- if (abs(x) > 0.0001 || abs(y) > 0.0001 || abs(z) > 0.0001)
-+ if (std::abs(x) > 0.0001 || std::abs(y) > 0.0001 || std::abs(z) > 0.0001)
- {
- bMoveCmeraModel = true;
- }
-@@ -240,7 +240,7 @@
- {
- if (!bAerialView)
- return;
-- if (abs(horizontal) > planar || abs(vertical) > 0.0001)
-+ if (std::abs(horizontal) > planar || std::abs(vertical) > 0.0001)
- {
- bRotateCameraModel = true;
- fRotateCameraXSpeed = 0;
-@@ -275,7 +275,7 @@
- void CPhysicalCamera::RotateCamera(double horizontal, double vertical,
- double planar)
- {
-- if (abs(horizontal) > planar || abs(vertical) > 0.0001)
-+ if (std::abs(horizontal) > planar || std::abs(vertical) > 0.0001)
- {
- bRotateCameraModel = true;
- }
-diff -ur libgltf.org/src/Font.cpp libgltf/src/Font.cpp
---- libgltf.org/src/Font.cpp 2014-06-26 15:49:57.807687346 +0200
-+++ libgltf/src/Font.cpp 2014-06-26 15:50:57.619684812 +0200
-@@ -8,6 +8,7 @@
- #include "Font.h"
-
- #include <glm/gtc/matrix_transform.hpp>
-+#include <cstdio>
-
- using namespace std;
-
diff --git a/external/libgltf/patches/extend_get_bitmap_for_rgba_ones.patch b/external/libgltf/patches/extend_get_bitmap_for_rgba_ones.patch
deleted file mode 100644
index 8b9f3dbf7b25..000000000000
--- a/external/libgltf/patches/extend_get_bitmap_for_rgba_ones.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
---- libgltf.org/src/RenderScene.cpp 2014-06-23 18:49:46.603119797 +0200
-+++ libgltf/src/RenderScene.cpp 2014-06-23 19:00:17.583092627 +0200
-@@ -1735,28 +1735,29 @@
-
- void RenderScene::setBitZoom(unsigned char* Dstbuffer,
- unsigned char* Srcbuffer,
-- glTFViewport* pViewport)
-+ glTFViewport* pViewport,
-+ int bufferDepth )
- {
- const int width = pViewport->width;
- const int height = pViewport->height;
-- const int newLineByte = (width * 3 + 3) / 4 * 4;
-- const int lineByte = (width * SSAA * 3 + 3) / 4 * 4;
-+ const int newLineByte = width * bufferDepth;
-+ const int lineByte = width * SSAA * bufferDepth;
- for (int i = 0; i < height; i++)
- {
- for (int j = 0; j < width; j++)
-- for (int k = 0; k < 3; k++)
-+ for (int k = 0; k < bufferDepth; k++)
- {
- long xData = (long)(i * SSAA + 0.5);
- long yData = (long)(j * SSAA + 0.5);
- if((yData >= 0) && (yData < width * SSAA) &&
- (xData >= 0) && (xData < height * SSAA))
- {
-- *(Dstbuffer + i * newLineByte + j * 3 + k) =
-- *(Srcbuffer + xData * lineByte + yData * 3 + k);
-+ *(Dstbuffer + i * newLineByte + j * bufferDepth + k) =
-+ *(Srcbuffer + xData * lineByte + yData * bufferDepth + k);
- }
- else
- {
-- *(Dstbuffer + i * newLineByte + j * 3 + k) = 255;
-+ *(Dstbuffer + i * newLineByte + j * bufferDepth + k) = 255;
- }
- }
- }
-@@ -1782,12 +1783,20 @@
- {
- return;
- }
-- int imageSize = ((width + ((4 - (width % 4)) % 4)) *
-- height * 3) + 2;
-+
-+ int bufferDepth;
-+ if( format == GL_RGB || format == GL_BGR )
-+ bufferDepth = 3;
-+ else if( format == GL_RGBA || format == GL_BGRA )
-+ bufferDepth = 4;
-+ else
-+ return;
-+
-+ int imageSize = width * height * bufferDepth;
- unsigned char *pbuffer = new unsigned char[imageSize];
- glReadPixels(0, 0, width, height, format,
- GL_UNSIGNED_BYTE, pbuffer);
-- setBitZoom(buffer, pbuffer, pViewport);
-+ setBitZoom(buffer, pbuffer, pViewport, bufferDepth);
- if (pbuffer)
- {
- delete [] pbuffer;
-diff -ur libgltf.org/src/RenderScene.h libgltf/src/RenderScene.h
---- libgltf.org/src/RenderScene.h 2014-06-23 18:49:46.587119798 +0200
-+++ libgltf/src/RenderScene.h 2014-06-23 18:59:46.991093944 +0200
-@@ -234,7 +234,7 @@
- void completeRenderBitmap(glTFViewport* pViewport,
- unsigned char* buffer, GLenum format);
- void setBitZoom(unsigned char* Dstbuffer,
-- unsigned char* Srcbuffer, glTFViewport* pViewport);
-+ unsigned char* Srcbuffer, glTFViewport* pViewport, int bufferDepth );
-
- // For animation
- void startAnimation();
diff --git a/external/libgltf/patches/extra_semicolon.patch b/external/libgltf/patches/extra_semicolon.patch
deleted file mode 100644
index 42602d6bba96..000000000000
--- a/external/libgltf/patches/extra_semicolon.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff -ur libgltf.org/src/Common.cpp libgltf/src/Common.cpp
---- libgltf.org/src/Common.cpp 2014-06-28 12:30:58.792097436 +0200
-+++ libgltf/src/Common.cpp 2014-06-28 12:31:13.884097997 +0200
-@@ -550,12 +550,12 @@
- /* -- Primitives -- */
- Primitives::Primitives()
- {
--};
-+}
-
- Primitives::~Primitives()
- {
- mAttributeMap.clear();
--};
-+}
-
- void Primitives::setMaterialIndex(std::string materialIndex)
- {
diff --git a/external/libgltf/patches/fix_package_file.patch b/external/libgltf/patches/fix_package_file.patch
deleted file mode 100644
index 509634d7327a..000000000000
--- a/external/libgltf/patches/fix_package_file.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -ur libgltf.org/libgltf.pc.in libgltf/libgltf.pc.in
---- libgltf.org/libgltf.pc.in 2014-06-27 18:52:24.323562505 +0200
-+++ libgltf/libgltf.pc.in 2014-06-27 18:52:48.423561484 +0200
-@@ -6,8 +6,7 @@
- Name: libgltf-@GLTF_MAJOR_VERSION@.@GLTF_MINOR_VERSION@
- Description: Library for rendering glTF models.
- Version: @VERSION@
--Requires: glew-1.10.0 glm glu
-+Requires: glew
- Libs: -L${libdir} -lgltf-@GLTF_MAJOR_VERSION@.@GLTF_MINOR_VERSION@
- Cflags: -I${includedir}/libgltf-@GLTF_MAJOR_VERSION@.@GLTF_MINOR_VERSION@
-
--Requires.private: boost
diff --git a/external/libgltf/patches/init_scene_set_handle.patch b/external/libgltf/patches/init_scene_set_handle.patch
deleted file mode 100644
index 88ad05325cf3..000000000000
--- a/external/libgltf/patches/init_scene_set_handle.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-diff -ur libgltf.org/src/LoadScene.cpp libgltf/src/LoadScene.cpp
---- libgltf.org/src/LoadScene.cpp 2014-06-23 14:55:58.099723870 +0200
-+++ libgltf/src/LoadScene.cpp 2014-06-23 14:56:04.399723599 +0200
-@@ -149,10 +149,14 @@
- return true;
- }
-
--int Parser::parseScene(Scene* pscene)
-+void Parser::setScene(Scene* pscene)
-+{
-+ pScene = pscene;
-+}
-+
-+int Parser::parseScene()
- {
- int status;
-- this->pScene = pscene;
-
- status = this->readBuffers();
- if (status < 0)
-diff -ur libgltf.org/src/LoadScene.h libgltf/src/LoadScene.h
---- libgltf.org/src/LoadScene.h 2014-06-23 14:55:58.079723871 +0200
-+++ libgltf/src/LoadScene.h 2014-06-23 14:56:37.303722182 +0200
-@@ -21,7 +21,8 @@
- public:
- glTFHandle* getFileNameInJson(const std::string& jsonFile);
- bool releaseFileName();
-- int parseScene(Scene* pscene);
-+ void setScene(Scene* pscene);
-+ int parseScene();
- bool parseJsonFile();
- void setJsonInfo(const std::string& sbuffer);
- void setJsonInfo(const std::string& direct, const std::string& fileName);
-diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
---- libgltf.org/src/RenderScene.cpp 2014-06-23 14:55:58.099723870 +0200
-+++ libgltf/src/RenderScene.cpp 2014-06-23 14:56:07.239723477 +0200
-@@ -657,16 +657,15 @@
- {
- return LIBGLTF_PARSE_JSON_ERROR;
- }
-- int iStatus = mLoadJson.parseScene(&scene);
-+ int iStatus = mLoadJson.parseScene();
- return iStatus;
- }
-
- int RenderScene::loadScene(Scene& scene, glTFHandle* handle)
- {
-- scene.setGltfHandle(handle);
- try
- {
-- int iStatus = mLoadJson.parseScene(&scene);
-+ int iStatus = mLoadJson.parseScene();
- return iStatus;
- }
- catch (boost::property_tree::ptree_error& e)
-@@ -694,7 +693,11 @@
- return 0;
- }
- string tmpFileName(jsonfile->filename);
-- return mLoadJson.getFileNameInJson(tmpFileName);
-+ glTFHandle* handle = mLoadJson.getFileNameInJson(tmpFileName);
-+ pScene = new Scene();
-+ pScene->setGltfHandle(handle);
-+ mLoadJson.setScene(pScene);
-+ return handle;
- }
-
- unsigned int RenderScene::bindAttribute(const Attribute* pAttr)
-@@ -969,11 +972,6 @@
- {
- initOpengl();
-
-- pScene = new Scene();
-- if (0 == pScene)
-- {
-- return LIBGLTF_MEMORY_ERROR;
-- }
- int iResult = loadScene(*pScene, handle);
- if (iResult != LIBGLTF_SUCCESS)
- {
diff --git a/external/libgltf/patches/libgltf_configure.patch b/external/libgltf/patches/libgltf_configure.patch
deleted file mode 100644
index d224ab9b7a8c..000000000000
--- a/external/libgltf/patches/libgltf_configure.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-diff -ur libgltf.org/configure libgltf/configure
---- libgltf.org/configure 2014-06-25 18:41:32.470228670 +0200
-+++ libgltf/configure 2014-06-25 18:42:03.922227337 +0200
-@@ -15581,15 +15581,18 @@
- # =========
- # Find boost
- # =========
-+save_CPPFLAGS=$CPPFLAGS
-+CPPFLAGS="$CPPFLAGS $BOOST_CFLAGS"
-
- ac_fn_cxx_check_header_mongrel "$LINENO" "boost/property_tree/json_parser.hpp" "ac_cv_header_boost_property_tree_json_parser_hpp" "$ac_includes_default"
- if test "x$ac_cv_header_boost_property_tree_json_parser_hpp" = xyes; then :
-- BOOST_CFLAGS=
-+
- else
- as_fn_error $? "boost/property_tree/json_parser.hpp not found. install boost" "$LINENO" 5
- fi
-
-
-+CPPFLAGS=$save_CPPFLAGS
-
-
- # =========
-@@ -15685,14 +15688,17 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
-
-+ save_CPPFLAGS=$CPPFLAGS
-+ CPPFLAGS="$CPPFLAGS $GLEW_CFLAGS"
- ac_fn_cxx_check_header_mongrel "$LINENO" "GL/glew.h" "ac_cv_header_GL_glew_h" "$ac_includes_default"
- if test "x$ac_cv_header_GL_glew_h" = xyes; then :
-- GLEW_CFLAGS=
-+
- else
- as_fn_error $? "GL/glew.h not found. install glew" "$LINENO" 5
- fi
-
-
-+ CPPFLAGS=$save_CPPFLAGS
-
- fi
-
-@@ -15707,14 +15713,17 @@
- ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-+save_CPPFLAGS=$CPPFLAGS
-+CPPFLAGS="$CPPFLAGS $GLM_CFLAGS"
- ac_fn_cxx_check_header_mongrel "$LINENO" "glm/glm.hpp" "ac_cv_header_glm_glm_hpp" "$ac_includes_default"
- if test "x$ac_cv_header_glm_glm_hpp" = xyes; then :
-- GLM_CFLAGS=
-+
- else
- as_fn_error $? "glm/glm.hpp not found. install glm" "$LINENO" 5
- fi
-
-
-+CPPFLAGS=$save_CPPFLAGS
- ac_ext=cpp
- ac_cpp='$CXXCPP $CPPFLAGS'
- ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
diff --git a/external/libgltf/patches/move_fps_closer_to_the_corner.patch b/external/libgltf/patches/move_fps_closer_to_the_corner.patch
deleted file mode 100644
index 10ef74c096bc..000000000000
--- a/external/libgltf/patches/move_fps_closer_to_the_corner.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur libgltf.org/src/FPSCounter.cpp libgltf/src/FPSCounter.cpp
---- libgltf.org/src/FPSCounter.cpp 2014-06-24 18:10:46.317967903 +0200
-+++ libgltf/src/FPSCounter.cpp 2014-06-24 18:10:58.629967382 +0200
-@@ -104,7 +104,7 @@
- ++mFrames;
- }
-
-- pFont->printFormattedString(pViewport->width - 100, 30, 15, "%d", mFPS);
-+ pFont->printFormattedString(pViewport->width - 40, 10, 15, "%d", mFPS);
-
- glEnable(GL_DEPTH_TEST);
- }
diff --git a/external/libgltf/patches/no_animation_in_orbit_mode.patch b/external/libgltf/patches/no_animation_in_orbit_mode.patch
deleted file mode 100644
index dab0244b9ef2..000000000000
--- a/external/libgltf/patches/no_animation_in_orbit_mode.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
---- libgltf.org/src/RenderScene.cpp 2014-06-24 16:53:41.030163890 +0200
-+++ libgltf/src/RenderScene.cpp 2014-06-24 16:53:44.406163746 +0200
-@@ -1848,8 +1848,6 @@
-
- void RenderScene::startAnimation()
- {
-- if (bAerialView)
-- return;
- this->mAnimationPlay = true;
- mCurrentTime = 0;
- mUpdateTimeOut = 0;
-@@ -1858,8 +1856,6 @@
-
- void RenderScene::stopAnimation()
- {
-- if (bAerialView)
-- return;
- if (pScene->getSkinSize() != 0)
- {
- this->mAnimationPlay = false;
-@@ -1874,10 +1870,6 @@
- roCameraY = glm::mat4(1.0);
- pCamera->AerialViewY = 0.0;
- bAerialView = false;
-- if (bAnimation)
-- {
-- startAnimation();
-- }
- if (IsAerialMode)
- {
- pScene->setUseCameraInJson(true);
-@@ -1897,10 +1889,6 @@
- roCameraX = glm::mat4(1.0);
- roCameraY = glm::mat4(1.0);
- //Stop animation.
-- if (pScene->getSkinSize() != 0)
-- {
-- this->mAnimationPlay = false;
-- }
- bAerialView = true;
- if (pScene->getUseCameraInJson())
- {
diff --git a/external/libgltf/patches/no_effect_of_set_looping.patch b/external/libgltf/patches/no_effect_of_set_looping.patch
deleted file mode 100644
index 1bfa4c901456..000000000000
--- a/external/libgltf/patches/no_effect_of_set_looping.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
---- libgltf.org/src/RenderScene.cpp 2014-06-23 21:16:55.134739637 +0200
-+++ libgltf/src/RenderScene.cpp 2014-06-23 21:16:58.834739477 +0200
-@@ -1976,5 +1976,10 @@
- {
- bIsTimeAvailable = false;
- }
-+ if( !mAnimationLoop && mCurrentTime > mDuration )
-+ {
-+ stopAnimation();
-+ setAnimTime(0.0);
-+ }
- }
-
diff --git a/external/libgltf/patches/remove_config_h_in_dependencies.patch b/external/libgltf/patches/remove_config_h_in_dependencies.patch
deleted file mode 100644
index fae09e77d4be..000000000000
--- a/external/libgltf/patches/remove_config_h_in_dependencies.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur libgltf.org/Makefile.in libgltf/Makefile.in
---- libgltf.org/Makefile.in 2014-06-25 23:16:52.417528674 +0200
-+++ libgltf/Makefile.in 2014-06-25 23:16:56.493528501 +0200
-@@ -419,7 +419,7 @@
- stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
- @rm -f stamp-h1
- cd $(top_builddir) && $(SHELL) ./config.status config.h
--$(srcdir)/config.h.in: $(am__configure_deps)
-+$(srcdir)/config.h.in:
- ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
- rm -f stamp-h1
- touch $@
diff --git a/external/libgltf/patches/walkthrough_mode_affects_orbit_mode_unexpectedly.patch b/external/libgltf/patches/walkthrough_mode_affects_orbit_mode_unexpectedly.patch
deleted file mode 100644
index ef7217b0e0f7..000000000000
--- a/external/libgltf/patches/walkthrough_mode_affects_orbit_mode_unexpectedly.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur libgltf.org/src/Camera.cpp libgltf/src/Camera.cpp
---- libgltf.org/src/Camera.cpp 2014-06-24 17:36:27.870055125 +0200
-+++ libgltf/src/Camera.cpp 2014-06-24 17:36:43.514054463 +0200
-@@ -243,6 +243,8 @@
- if (abs(horizontal) > planar || abs(vertical) > 0.0001)
- {
- bRotateCameraModel = true;
-+ fRotateCameraXSpeed = 0;
-+ fRotateCameraYSpeed = 0;
- float deltaX = (float)(horizontal * fSensitivity * 0.01f);
- float deltaY = (float)(-vertical * fSensitivity * 0.01f);
- AerialViewY += -vertical;
diff --git a/external/libgltf/patches/wrong_animation_state_when_set_time_to_null.patch b/external/libgltf/patches/wrong_animation_state_when_set_time_to_null.patch
deleted file mode 100644
index 56548e24f648..000000000000
--- a/external/libgltf/patches/wrong_animation_state_when_set_time_to_null.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur libgltf.org/src/libgltf.cpp libgltf/src/libgltf.cpp
---- libgltf.org/src/libgltf.cpp 2014-06-23 20:38:35.470838661 +0200
-+++ libgltf/src/libgltf.cpp 2014-06-23 20:44:37.042823092 +0200
-@@ -235,7 +235,7 @@
- RenderScene* renderScene = (RenderScene*)handle->renderer;
- if (time <= 0)
- {
-- renderScene->startAnimation();
-+ renderScene->setAnimTime(0.0);
- }
- else
- {
diff --git a/external/libgltf/patches/wrong_duration_caused_by_uninitialized_member.patch b/external/libgltf/patches/wrong_duration_caused_by_uninitialized_member.patch
deleted file mode 100644
index 7e5554e6e648..000000000000
--- a/external/libgltf/patches/wrong_duration_caused_by_uninitialized_member.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -ur libgltf.org/src/Common.cpp libgltf/src/Common.cpp
---- libgltf.org/src/Common.cpp 2014-06-23 20:16:17.746896264 +0200
-+++ libgltf/src/Common.cpp 2014-06-23 20:17:50.610892265 +0200
-@@ -1037,7 +1037,8 @@
-
- /* -- Scene -- */
- Scene::Scene()
-- : pRootNode(0)
-+ : mDuration(0.0)
-+ , pRootNode(0)
- , pBuffer(0)
- , pGltfHandle(0)
- , bUseCameraInJson(false)
diff --git a/external/libgltf/patches/wrong_media_time_at_first_run_caused_by_uninitilized_member.patch b/external/libgltf/patches/wrong_media_time_at_first_run_caused_by_uninitilized_member.patch
deleted file mode 100644
index aa30dc225256..000000000000
--- a/external/libgltf/patches/wrong_media_time_at_first_run_caused_by_uninitilized_member.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
---- libgltf.org/src/RenderScene.cpp 2014-06-23 21:17:51.466737211 +0200
-+++ libgltf/src/RenderScene.cpp 2014-06-23 21:23:23.718722904 +0200
-@@ -602,6 +602,7 @@
- , roCameraX(1.0f), roCameraY(1.0f)
- , initCameraLocalMatrix(1.0f),initCameraGlobalMatrix(1.0f)
- , bAnimation(true), pTempMatrix(0)
-+ , bIsTimeAvailable(false)
- {
- mLastModelView = glm::mat4(0.0);
- #if ENABLE_FPS
diff --git a/external/libgltf/patches/wrong_media_time_caused_by_missing_fmod.patch b/external/libgltf/patches/wrong_media_time_caused_by_missing_fmod.patch
deleted file mode 100644
index 07f7f6f84e80..000000000000
--- a/external/libgltf/patches/wrong_media_time_caused_by_missing_fmod.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
---- libgltf.org/src/RenderScene.cpp 2014-06-23 20:35:06.246847670 +0200
-+++ libgltf/src/RenderScene.cpp 2014-06-23 20:35:24.366846890 +0200
-@@ -1919,7 +1919,9 @@
-
- double RenderScene::getAnimTime()
- {
-- return mCurrentTime;
-+ errno = 0;
-+ double time = fmod(this->mCurrentTime, this->mDuration);
-+ return errno == EDOM ? 0.0 : time;
- }
-
- void RenderScene::setAnimLoop(int loop)