Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
a0ef37c5
Kaydet (Commit)
a0ef37c5
authored
May 24, 2014
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
libgltf: Another new version.
Change-Id: I784579717674f1caf68ad489d1a931936f6f9651
üst
f2e0eafa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
135 deletions
+10
-135
oglplayer.cxx
avmedia/source/opengl/oglplayer.cxx
+9
-9
download.lst
download.lst
+1
-1
UnpackedTarball_libgltf.mk
external/libgltf/UnpackedTarball_libgltf.mk
+0
-1
disable_fps_and_timer.patch
external/libgltf/patches/disable_fps_and_timer.patch
+0
-124
No files found.
avmedia/source/opengl/oglplayer.cxx
Dosyayı görüntüle @
a0ef37c5
...
...
@@ -77,25 +77,25 @@ bool OGLPlayer::create( const OUString& rURL )
// Load external resources
for
(
size_t
i
=
0
;
i
<
m_pHandle
->
size
;
++
i
)
{
glTFFile
*
p
File
=
m_pHandle
->
files
[
i
];
if
(
pFile
&&
pFile
->
filename
)
glTFFile
&
r
File
=
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
(
p
File
,
sFilesURL
)
)
if
(
!
lcl_LoadFile
(
&
r
File
,
sFilesURL
)
)
{
SAL_WARN
(
"avmedia.opengl"
,
"Can't load glTF file: "
+
sFilesURL
);
return
false
;
...
...
download.lst
Dosyayı görüntüle @
a0ef37c5
...
...
@@ -88,7 +88,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
...
...
external/libgltf/UnpackedTarball_libgltf.mk
Dosyayı görüntüle @
a0ef37c5
...
...
@@ -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:
external/libgltf/patches/disable_fps_and_timer.patch
deleted
100644 → 0
Dosyayı görüntüle @
f2e0eafa
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment