[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - external/libgltf

2014-06-04 Thread Zolnai Tamás
 external/libgltf/UnpackedTarball_libgltf.mk |1 
 external/libgltf/patches/accurate_fps_counter.patch |   41 
 2 files changed, 42 insertions(+)

New commits:
commit 813bd9a1b84f2629fce991805ad801db9997cc63
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Wed Jun 4 09:37:52 2014 +0200

Patching libgltf: make FPS counter more accurate

Before, it only calculated with the rendering time of the
last frame of the second. So it did not matter how much
frame was rendered actually.
Now, it counts the frames.

Change-Id: I0928a4c3f6e4770c253708f1a4d41c7745de18b7

diff --git a/external/libgltf/UnpackedTarball_libgltf.mk 
b/external/libgltf/UnpackedTarball_libgltf.mk
index 5e293e9..8ec713b 100644
--- a/external/libgltf/UnpackedTarball_libgltf.mk
+++ b/external/libgltf/UnpackedTarball_libgltf.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libgltf,\
external/libgltf/patches/use_8x_ssaa.diff \
external/libgltf/patches/rgba_textures.patch \
external/libgltf/patches/deallocation_fix.patch \
+   external/libgltf/patches/accurate_fps_counter.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libgltf/patches/accurate_fps_counter.patch 
b/external/libgltf/patches/accurate_fps_counter.patch
new file mode 100644
index 000..127fed6
--- /dev/null
+++ b/external/libgltf/patches/accurate_fps_counter.patch
@@ -0,0 +1,41 @@
+diff -ur libgltf.org/src/FPSCounter.cpp libgltf/src/FPSCounter.cpp
+--- libgltf.org/src/FPSCounter.cpp 2014-06-04 08:55:02.133882400 +0200
 libgltf/src/FPSCounter.cpp 2014-06-04 09:14:40.847536600 +0200
+@@ -74,8 +74,9 @@
+ glUniform4fv(iLoc, 1, (GLfloat*)lightVector);
+ if (mDurationTime = CLOCKS_PER_SEC)
+ {
+-mFPS = getFPS();
++mFPS = mFrames;
+ mDurationTime = 0;
++mFrames = 0;
+ #ifdef _WIN32
+ mTotalTime = getExecutionTime();
+ #endif
+@@ -110,6 +111,7 @@
+ #endif
+ #endif
+ }
++++mFrames;
+ }
+ 
+ pFont-printFormattedString(pViewport-width - 100, 30, 15, FPS: 
%d,mFPS);
+diff -ur libgltf.org/src/FPSCounter.h libgltf/src/FPSCounter.h
+--- libgltf.org/src/FPSCounter.h   2014-06-04 08:55:02.133882400 +0200
 libgltf/src/FPSCounter.h   2014-06-04 08:58:18.704629400 +0200
+@@ -75,6 +75,7 @@
+ShaderProgram* pShaderProgram)
+ : mFPS(0), mDurationTime(0),mCurrentTime(0)
+ ,mLastTime(0),mTotalTime(0),uiFPSProgram(0)
++,mFrames(0)
+ {
+ pFont = new Font();
+ pFont-loadFont(fontBuf,bufSize, 32);
+@@ -128,6 +129,7 @@
+ #endif
+ #endif
+ 
++int mFrames;
+ int mFPS;
+ 
+ #if WRITEFPS2FILE
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - external/libgltf

2014-05-30 Thread Jan Holesovsky
 external/libgltf/UnpackedTarball_libgltf.mk |1 +
 external/libgltf/patches/use_8x_ssaa.diff   |   13 +
 2 files changed, 14 insertions(+)

New commits:
commit 8e364365e7540ff24f19cbf00d057c21612fe02c
Author: Jan Holesovsky ke...@collabora.com
Date:   Fri May 30 16:23:30 2014 +0200

[not for master] Force 8x SSAA.

Change-Id: Ieadde4df00562278aa5ce7a92435c9a58b7c6572

diff --git a/external/libgltf/UnpackedTarball_libgltf.mk 
b/external/libgltf/UnpackedTarball_libgltf.mk
index 68eb669..5e293e9 100644
--- a/external/libgltf/UnpackedTarball_libgltf.mk
+++ b/external/libgltf/UnpackedTarball_libgltf.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libgltf,\
external/libgltf/patches/include_path_glew.patch \
external/libgltf/patches/include_path_freetype.patch \
external/libgltf/patches/smaller_fps.diff \
+   external/libgltf/patches/use_8x_ssaa.diff \
external/libgltf/patches/rgba_textures.patch \
external/libgltf/patches/deallocation_fix.patch \
 ))
diff --git a/external/libgltf/patches/use_8x_ssaa.diff 
b/external/libgltf/patches/use_8x_ssaa.diff
new file mode 100644
index 000..c43d98e
--- /dev/null
+++ b/external/libgltf/patches/use_8x_ssaa.diff
@@ -0,0 +1,13 @@
+diff --git a/libgltf/src/RenderScene.h b/libgltf/src/RenderScene.h
+index b6bebd4..af135e0 100644
+--- libgltf/src/RenderScene.h
 libgltf/src/RenderScene.h
+@@ -29,7 +29,7 @@
+ #endif
+ 
+ #define LOAD_ONCE  0
+-#define SSAA   2
++#define SSAA   8
+ #define POLYGONSORTING 0
+ #define FBOVERT #version 330 core\n\
+ attribute vec4 vPosition;\n\
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - external/libgltf

2014-05-28 Thread Jan Holesovsky
 external/libgltf/UnpackedTarball_libgltf.mk |1 +
 external/libgltf/patches/smaller_fps.diff   |   28 
 2 files changed, 29 insertions(+)

New commits:
commit af930e5a63cc77bf331590b807f19bf53559e12a
Author: Jan Holesovsky ke...@collabora.com
Date:   Wed May 28 18:59:15 2014 +0200

libgltf: Add patch to move FPS to a different place.

Change-Id: I9500e431b7eb763ef2a8b70a887a1b24cb1c0579

diff --git a/external/libgltf/UnpackedTarball_libgltf.mk 
b/external/libgltf/UnpackedTarball_libgltf.mk
index dfae5ec..68eb669 100644
--- a/external/libgltf/UnpackedTarball_libgltf.mk
+++ b/external/libgltf/UnpackedTarball_libgltf.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libgltf,1))
 $(eval $(call gb_UnpackedTarball_add_patches,libgltf,\
external/libgltf/patches/include_path_glew.patch \
external/libgltf/patches/include_path_freetype.patch \
+   external/libgltf/patches/smaller_fps.diff \
external/libgltf/patches/rgba_textures.patch \
external/libgltf/patches/deallocation_fix.patch \
 ))
diff --git a/external/libgltf/patches/smaller_fps.diff 
b/external/libgltf/patches/smaller_fps.diff
new file mode 100644
index 000..95dc25a
--- /dev/null
+++ b/external/libgltf/patches/smaller_fps.diff
@@ -0,0 +1,28 @@
+changeset:   780:717f918a0e00
+tag: tip
+user:yan...@mcw-yzhang.mcw-cc.cn
+date:Wed May 28 20:21:52 2014 +0800
+files:   Impress/libgltf/src/FPSCounter.cpp
+description:
+1) remove Render Total Time string from it
+2) move the FPS text to the bottom right corner
+3) reduce the font size to 1/3 of what it now
+
+
+diff -r 3ee778f06e4e -r 717f918a0e00 Impress/libgltf/src/FPSCounter.cpp
+--- libgltf/src/FPSCounter.cpp Wed May 28 18:00:06 2014 +0800
 libgltf/src/FPSCounter.cpp Wed May 28 20:21:52 2014 +0800
+@@ -110,11 +110,7 @@
+ }
+ }
+ 
+-pFont-printFormattedString(20, pViewport-height - 30, 20, FPS: %d,
+-mFPS);
+-pFont-printFormattedString(20, pViewport-height - 60, 20,
+-Render Total Time: %.6f ms,
+-mTotalTime * 1000);
++pFont-printFormattedString(pViewport-width - 100, 30, 15, FPS: 
%d,mFPS);
+ glEnable(GL_DEPTH_TEST);
+ }
+ #endif //ENABLE_FPS
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - external/libgltf

2014-05-27 Thread Zolnai Tamás
 external/libgltf/UnpackedTarball_libgltf.mk  |1 +
 external/libgltf/patches/rgba_textures.patch |   12 
 2 files changed, 13 insertions(+)

New commits:
commit 777c7360f77adf833878a83cbd464bda3374da11
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Tue May 27 16:48:30 2014 +0200

Patching libgltf: the passed texture bitmaps are RGBA buffers

Change-Id: I53f6a97820da12e89d567e1bc10226fa27cafd84

diff --git a/external/libgltf/UnpackedTarball_libgltf.mk 
b/external/libgltf/UnpackedTarball_libgltf.mk
index acfbab0..7a0d91a 100644
--- a/external/libgltf/UnpackedTarball_libgltf.mk
+++ b/external/libgltf/UnpackedTarball_libgltf.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libgltf,\
external/libgltf/patches/include_path_glew.patch \
external/libgltf/patches/include_path_freetype.patch \
external/libgltf/patches/free_file_buffers.patch \
+   external/libgltf/patches/rgba_textures.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libgltf/patches/rgba_textures.patch 
b/external/libgltf/patches/rgba_textures.patch
new file mode 100644
index 000..b220894
--- /dev/null
+++ b/external/libgltf/patches/rgba_textures.patch
@@ -0,0 +1,12 @@
+diff -ur libgltf.org/src/Texture.cpp libgltf/src/Texture.cpp
+--- libgltf.org/src/Texture.cpp2014-05-27 16:40:18.625920865 +0200
 libgltf/src/Texture.cpp2014-05-27 16:41:45.601917179 +0200
+@@ -60,7 +60,7 @@
+ bool Texture::loadTexture2DFromBuffer(unsigned char* buffer, int width,
+   int height)
+ {
+-GLenum format = GL_BGRA;
++GLenum format = GL_RGBA;
+ 
+ createFromData(buffer, width, height, format, false);
+ 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - external/libgltf

2014-05-26 Thread Zolnai Tamás
 external/libgltf/UnpackedTarball_libgltf.mk  |1 
 external/libgltf/patches/free_file_buffers.patch |   58 +++
 2 files changed, 59 insertions(+)

New commits:
commit 26df4ae661dcbb125df6791dd8cc6da543548b46
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Mon May 26 21:48:40 2014 +0200

patching libgltf: stop a huge memory leak

It is ambiguos where we should free file buffers because they
are allocated by the caller code, but since gltfHandle is
deallocated inside libgltf and libgltf has a gltf_renderer_release
method for deallocation it seems better to free them by libgltf.

Change-Id: If3d9abed0514128c13cde8c1967ea80c4d27bf59

diff --git a/external/libgltf/UnpackedTarball_libgltf.mk 
b/external/libgltf/UnpackedTarball_libgltf.mk
index d8434b6..acfbab0 100644
--- a/external/libgltf/UnpackedTarball_libgltf.mk
+++ b/external/libgltf/UnpackedTarball_libgltf.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libgltf,1))
 $(eval $(call gb_UnpackedTarball_add_patches,libgltf,\
external/libgltf/patches/include_path_glew.patch \
external/libgltf/patches/include_path_freetype.patch \
+   external/libgltf/patches/free_file_buffers.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libgltf/patches/free_file_buffers.patch 
b/external/libgltf/patches/free_file_buffers.patch
new file mode 100644
index 000..9f92da3
--- /dev/null
+++ b/external/libgltf/patches/free_file_buffers.patch
@@ -0,0 +1,58 @@
+diff -ur libgltf.org/src/LoadScene.cpp libgltf/src/LoadScene.cpp
+--- libgltf.org/src/LoadScene.cpp  2014-05-26 21:46:51.986986538 +0200
 libgltf/src/LoadScene.cpp  2014-05-26 21:47:28.206985004 +0200
+@@ -127,7 +127,7 @@
+ return gHandle;
+ }
+ 
+-bool Parser::releaseFileName()
++bool Parser::releaseFiles()
+ {
+ glTFHandle* gHandle = pScene-getGltfHandle();
+ for (int i = (int)gHandle-size - 1 ; i = 0 ; i--)
+@@ -137,6 +137,7 @@
+ free(gHandle-files[i].filename);
+ gHandle-files[i].filename = NULL;
+ }
++delete [] gHandle-files[i].buffer;
+ }
+ 
+ if (gHandle-files != NULL)
+diff -ur libgltf.org/src/LoadScene.h libgltf/src/LoadScene.h
+--- libgltf.org/src/LoadScene.h2014-05-26 21:46:51.986986538 +0200
 libgltf/src/LoadScene.h2014-05-26 21:47:33.170984793 +0200
+@@ -26,7 +26,7 @@
+ {
+ public:
+ glTFHandle* getFileNameInJson(const std::string jsonFile);
+-bool releaseFileName();
++bool releaseFiles();
+ int parseScene(Scene* pscene);
+ bool parseJsonFile();
+ void setJsonInfo(const std::string sbuffer);
+@@ -81,4 +81,4 @@
+ bool is_json_in_buffer;
+ };
+ 
+-#endif
+\ No newline at end of file
++#endif
+diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
+--- libgltf.org/src/RenderScene.cpp2014-05-26 21:46:51.986986538 +0200
 libgltf/src/RenderScene.cpp2014-05-26 21:47:39.358984531 +0200
+@@ -1426,7 +1426,7 @@
+ 
+ void RenderScene::releaseRender()
+ {
+-mLoadJson.releaseFileName();
++mLoadJson.releaseFiles();
+ fbo.releaseFbo();
+ return;
+ }
+@@ -1543,4 +1543,4 @@
+ int  RenderScene::isAnimPlay()
+ {
+ return this-mAnimationPlay ? 1 : 0;
+-}
+\ No newline at end of file
++}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - external/libgltf

2014-05-25 Thread Jan Holesovsky
 external/libgltf/StaticLibrary_libgltf.mk |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit e0f53e8c1ed8f90b9d56991dc781ec07ea53bcd1
Author: Jan Holesovsky ke...@collabora.com
Date:   Sun May 25 09:49:24 2014 +0200

[not for master] libgltf: Enable FPSCounter.

Change-Id: I83507ff17b169b3ea529c4a99fe6de61e6212c87

diff --git a/external/libgltf/StaticLibrary_libgltf.mk 
b/external/libgltf/StaticLibrary_libgltf.mk
index 99a06c2..bdc6f37 100644
--- a/external/libgltf/StaticLibrary_libgltf.mk
+++ b/external/libgltf/StaticLibrary_libgltf.mk
@@ -27,6 +27,10 @@ $(eval $(call gb_StaticLibrary_use_externals,libgltf,\
 freetype \
 ))
 
+$(eval $(call gb_StaticLibrary_add_defs,libgltf,\
+   -DENABLE_FPS=1 \
+))
+
 $(eval $(call gb_StaticLibrary_set_include,libgltf,\
 -I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \
$$(INCLUDE) \
@@ -35,6 +39,8 @@ $(eval $(call gb_StaticLibrary_set_include,libgltf,\
 $(eval $(call gb_StaticLibrary_add_generated_exception_objects,libgltf,\
UnpackedTarball/libgltf/src/Camera \
UnpackedTarball/libgltf/src/Common \
+   UnpackedTarball/libgltf/src/Font \
+   UnpackedTarball/libgltf/src/FPSCounter \
UnpackedTarball/libgltf/src/libgltf \
UnpackedTarball/libgltf/src/LoadScene \
UnpackedTarball/libgltf/src/RenderScene \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits