avmedia/source/opengl/oglplayer.cxx | 18 +- download.lst | 2 external/libgltf/StaticLibrary_libgltf.mk | 2 external/libgltf/UnpackedTarball_libgltf.mk | 1 external/libgltf/patches/disable_fps_and_timer.patch | 124 ------------------- 5 files changed, 10 insertions(+), 137 deletions(-)
New commits: commit f60b1ae90a63909178391eb2a3610e79783b8d33 Author: Jan Holesovsky <ke...@collabora.com> Date: Sat May 24 17:49:38 2014 +0200 libgltf: Another new version. Change-Id: I784579717674f1caf68ad489d1a931936f6f9651 diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx index 323242a..f2e80d2 100644 --- a/avmedia/source/opengl/oglplayer.cxx +++ b/avmedia/source/opengl/oglplayer.cxx @@ -76,25 +76,25 @@ bool OGLPlayer::create( const OUString& rURL ) // Load external resources for( size_t i = 0; i < m_pHandle->size; ++i ) { - glTFFile* pFile = m_pHandle->files[i]; - if( pFile && pFile->filename ) + glTFFile& rFile = m_pHandle->files[i]; + if( rFile.filename ) { const OUString sFilesURL = - INetURLObject::GetAbsURL(m_sURL,OStringToOUString(OString(pFile->filename),RTL_TEXTENCODING_UTF8)); - if( pFile->type == GLTF_IMAGE ) + INetURLObject::GetAbsURL(m_sURL,OStringToOUString(OString(rFile.filename),RTL_TEXTENCODING_UTF8)); + if( rFile.type == GLTF_IMAGE ) { // Load images as bitmaps GraphicFilter aFilter; Graphic aGraphic; aFilter.ImportGraphic(aGraphic, INetURLObject(sFilesURL)); const BitmapEx aBitmapEx = aGraphic.GetBitmapEx(); - pFile->buffer = (char*)OpenGLHelper::ConvertBitmapExToRGBABuffer(aBitmapEx); - pFile->imagewidth = aBitmapEx.GetSizePixel().Width(); - pFile->imageheight = aBitmapEx.GetSizePixel().Height(); + rFile.buffer = (char*)OpenGLHelper::ConvertBitmapExToRGBABuffer(aBitmapEx); + rFile.imagewidth = aBitmapEx.GetSizePixel().Width(); + rFile.imageheight = aBitmapEx.GetSizePixel().Height(); } - else if( pFile->type == GLTF_BINARY || pFile->type == GLTF_GLSL ) + else if( rFile.type == GLTF_BINARY || rFile.type == GLTF_GLSL ) { - if( !lcl_LoadFile(pFile, sFilesURL) ) + if( !lcl_LoadFile(&rFile, sFilesURL) ) { SAL_WARN("avmedia.opengl", "Can't load glTF file: " + sFilesURL); return false; diff --git a/download.lst b/download.lst index 20921ad..3e13a8e 100644 --- a/download.lst +++ b/download.lst @@ -82,7 +82,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 := 510c3f8504bfb8cc8c8fc5d0fac74055-libgltf.tar.bz2 +export LIBGLTF_TARBALL := 1ce9a9714caff757bab489257eda955d-libgltf.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/StaticLibrary_libgltf.mk b/external/libgltf/StaticLibrary_libgltf.mk index 4628ebb..99a06c2 100644 --- a/external/libgltf/StaticLibrary_libgltf.mk +++ b/external/libgltf/StaticLibrary_libgltf.mk @@ -35,8 +35,6 @@ $(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 \ diff --git a/external/libgltf/UnpackedTarball_libgltf.mk b/external/libgltf/UnpackedTarball_libgltf.mk index e919c71..d8434b6 100644 --- a/external/libgltf/UnpackedTarball_libgltf.mk +++ b/external/libgltf/UnpackedTarball_libgltf.mk @@ -18,7 +18,6 @@ $(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/disable_fps_and_timer.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/libgltf/patches/disable_fps_and_timer.patch b/external/libgltf/patches/disable_fps_and_timer.patch deleted file mode 100644 index c5d5eb2..0000000 --- a/external/libgltf/patches/disable_fps_and_timer.patch +++ /dev/null @@ -1,124 +0,0 @@ -diff --git libgltf/src/RenderScene.cpp libgltf/src/RenderScene.cpp -index 88c5c9a..6639572 100644 ---- libgltf/src/RenderScene.cpp -+++ libgltf/src/RenderScene.cpp -@@ -383,7 +383,9 @@ void RenderWithFBO::releaseFbo() - - - CPhysicalCamera* RenderScene::sCamera = NULL; -+#if ENABLE_FPS - FPSCounter* RenderScene::pFPSCounter = NULL; -+#endif - ShaderProgram RenderScene::mShaderProgram = ShaderProgram(); - - RenderScene::RenderScene() -@@ -400,10 +402,12 @@ RenderScene::RenderScene() - - RenderScene::~RenderScene() - { -+#if ENABLE_FPS - if (pFPSCounter != NULL) - { - delete pFPSCounter; - } -+#endif - #if ENABLE_TIMER - if(pTimer != NULL) - { -@@ -815,8 +819,10 @@ int RenderScene::initRender(glTFHandle* handle) - - void RenderScene::initFPS(unsigned char* fontBuf,unsigned int bufSize) - { -+#if ENABLE_FPS - pFPSCounter = new FPSCounter(fontBuf,bufSize); - pFPSCounter->loadFPSShader(&mShaderProgram); -+#endif - } - - void RenderScene::renderPrimitive(RenderPrimitive* pPrimitive, -@@ -1132,10 +1138,12 @@ void RenderScene::drawTriangle(RenderPrimitive* pPrimitive) - - void RenderScene::prepareRender(void* lpParam) - { -+#if ENABLE_FPS - if (pFPSCounter != NULL) - { - pFPSCounter->timeStamp(); - } -+#endif - viewport = *((glTFViewport*)lpParam); - fbo.createAndBindFbo(viewport.width * SSAA, viewport.height * SSAA); - glBindFramebuffer(GL_FRAMEBUFFER, fbo.mFboId); -@@ -1229,10 +1237,12 @@ void RenderScene::renderShader(Technique* pTechnique) - - void RenderScene::completeRender() - { -+#if ENABLE_FPS - if (pFPSCounter != NULL) - { - pFPSCounter->printFPS(&viewport); - } -+#endif - glViewport(viewport.x, viewport.y, viewport.width, viewport.height); - glBindFramebuffer(GL_FRAMEBUFFER, 0); - fbo.renderFboTexture(); -@@ -1356,4 +1366,4 @@ double RenderScene::getAnimDuration() - int RenderScene::isAnimPlay() - { - return this->mAnimationPlay ? 1 : 0; --} -\ No newline at end of file -+} -diff --git libgltf/src/RenderScene.h libgltf/src/RenderScene.h -index cc0b3e5..065a689 100644 ---- libgltf/src/RenderScene.h -+++ libgltf/src/RenderScene.h -@@ -8,12 +8,22 @@ - #ifndef RENDERSCENE_H - #define RENDERSCENE_H - -+#ifndef ENABLE_FPS -+#define ENABLE_FPS 0 -+#endif -+ -+#ifndef ENABLE_TIMER -+#define ENABLE_TIMER 0 -+#endif -+ - #include "Shaders.h" - #include "Common.h" - #include "Texture.h" - #include "Camera.h" - #include "LoadScene.h" -+#if ENABLE_FPS - #include "FPSCounter.h" -+#endif - #include "Timer.h" - - using namespace glTF; -@@ -246,7 +256,9 @@ private: - bool loadFPSShader(); - int getFPS(); - void printFPS(glTFViewport* pViewpoit); -+#if ENABLE_FPS - static FPSCounter* pFPSCounter; -+#endif - RenderWithFBO fbo; - #if ENABLE_TIMER - Timer* pTimer; -diff --git libgltf/src/Timer.h libgltf/src/Timer.h -index e4d778b..9ab2d74 100644 ---- libgltf/src/Timer.h -+++ libgltf/src/Timer.h -@@ -10,7 +10,10 @@ - #include "time.h" - #include "Common.h" - --#define ENABLE_TIMER 1 -+#ifndef ENABLE_TIMER -+#define ENABLE_TIMER 0 -+#endif -+ - #define DETAILED_INFO 1 - - #if ENABLE_TIMER _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits