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
b4b10fc8
Kaydet (Commit)
b4b10fc8
authored
May 06, 2014
tarafından
Zolnai Tamás
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Upgrade libgltf
Change-Id: Ib7bc9562602d1d8da4082987302834ac2486d78a
üst
0ece50a4
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
198 additions
and
208 deletions
+198
-208
RepositoryExternal.mk
RepositoryExternal.mk
+0
-2
Library_avmediaogl.mk
avmedia/Library_avmediaogl.mk
+0
-3
oglframegrabber.cxx
avmedia/source/opengl/oglframegrabber.cxx
+1
-1
oglplayer.cxx
avmedia/source/opengl/oglplayer.cxx
+4
-7
oglplayer.hxx
avmedia/source/opengl/oglplayer.hxx
+0
-1
oglwindow.cxx
avmedia/source/opengl/oglwindow.cxx
+2
-0
download.lst
download.lst
+1
-1
UnpackedTarball_libgltf.mk
external/libgltf/UnpackedTarball_libgltf.mk
+7
-7
adress_of_temporary.patch
external/libgltf/patches/adress_of_temporary.patch
+0
-13
avoid_c++11.patch
external/libgltf/patches/avoid_c++11.patch
+0
-12
avoid_c++11_copy_filestream.patch
external/libgltf/patches/avoid_c++11_copy_filestream.patch
+12
-0
constify_for_temporaries.patch
external/libgltf/patches/constify_for_temporaries.patch
+24
-0
extra_qualification.patch
external/libgltf/patches/extra_qualification.patch
+0
-12
fmod_error_handling.patch
external/libgltf/patches/fmod_error_handling.patch
+14
-0
get_bitmap_new_syntax.patch
external/libgltf/patches/get_bitmap_new_syntax.patch
+30
-29
include_path_freetype.patch
external/libgltf/patches/include_path_freetype.patch
+9
-2
include_path_glew.patch
external/libgltf/patches/include_path_glew.patch
+17
-10
include_typo_texture.patch
external/libgltf/patches/include_typo_texture.patch
+0
-12
json_charbuffer_used_as_cstring.patch
...nal/libgltf/patches/json_charbuffer_used_as_cstring.patch
+0
-12
missing_include_cstring.patch
external/libgltf/patches/missing_include_cstring.patch
+0
-11
remove_extra_include.patch
external/libgltf/patches/remove_extra_include.patch
+11
-0
shader_charbuffer_used_as_cstring.patch
...l/libgltf/patches/shader_charbuffer_used_as_cstring.patch
+27
-27
typedef_used_as_struct.patch
external/libgltf/patches/typedef_used_as_struct.patch
+14
-0
unneeded_context_handling.patch
external/libgltf/patches/unneeded_context_handling.patch
+15
-9
win_only_variables.patch
external/libgltf/patches/win_only_variables.patch
+10
-37
No files found.
RepositoryExternal.mk
Dosyayı görüntüle @
b4b10fc8
...
@@ -3109,11 +3109,9 @@ endif # DESKTOP
...
@@ -3109,11 +3109,9 @@ endif # DESKTOP
ifeq ($(ENABLE_GLTF),TRUE)
ifeq ($(ENABLE_GLTF),TRUE)
# !! We need to avoid setting src as include (changes needed in libgltf)
define gb_LinkTarget__use_libgltf
define gb_LinkTarget__use_libgltf
$(call gb_LinkTarget_set_include,$(1),\
$(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \
-I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \
-I$(call gb_UnpackedTarball_get_dir,libgltf)/src \
$$(INCLUDE) \
$$(INCLUDE) \
)
)
...
...
avmedia/Library_avmediaogl.mk
Dosyayı görüntüle @
b4b10fc8
...
@@ -13,9 +13,6 @@ $(eval $(call gb_Library_set_componentfile,avmediaogl,avmedia/source/opengl/avme
...
@@ -13,9 +13,6 @@ $(eval $(call gb_Library_set_componentfile,avmediaogl,avmedia/source/opengl/avme
$(eval $(call gb_Library_use_sdk_api,avmediaogl))
$(eval $(call gb_Library_use_sdk_api,avmediaogl))
# Avoid warnings until libgltf's interface is minimized
$(eval $(call gb_Library_add_cxxflags,avmediaogl,-w))
$(eval $(call gb_Library_use_externals,avmediaogl, \
$(eval $(call gb_Library_use_externals,avmediaogl, \
boost_headers \
boost_headers \
libgltf \
libgltf \
...
...
avmedia/source/opengl/oglframegrabber.cxx
Dosyayı görüntüle @
b4b10fc8
...
@@ -37,7 +37,7 @@ uno::Reference< css::graphic::XGraphic > SAL_CALL OGLFrameGrabber::grabFrame( do
...
@@ -37,7 +37,7 @@ uno::Reference< css::graphic::XGraphic > SAL_CALL OGLFrameGrabber::grabFrame( do
throw
(
uno
::
RuntimeException
,
std
::
exception
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
{
boost
::
scoped_array
<
sal_uInt8
>
pBuffer
(
new
sal_uInt8
[
m_pHandle
->
viewport
.
width
*
m_pHandle
->
viewport
.
height
*
4
]);
boost
::
scoped_array
<
sal_uInt8
>
pBuffer
(
new
sal_uInt8
[
m_pHandle
->
viewport
.
width
*
m_pHandle
->
viewport
.
height
*
4
]);
gltf_renderer_get_bitmap
(
m_pHandle
,
fMediaTime
,
(
char
*
)
pBuffer
.
get
(),
m_pHandle
->
viewport
.
width
,
m_pHandle
->
viewport
.
height
,
GL_BGRA
);
gltf_renderer_get_bitmap
(
m_pHandle
,
fMediaTime
,
(
char
*
)
pBuffer
.
get
(),
GL_BGRA
);
BitmapEx
aBitmap
=
OpenGLHelper
::
ConvertBGRABufferToBitmapEx
(
pBuffer
.
get
(),
m_pHandle
->
viewport
.
width
,
m_pHandle
->
viewport
.
height
);
BitmapEx
aBitmap
=
OpenGLHelper
::
ConvertBGRABufferToBitmapEx
(
pBuffer
.
get
(),
m_pHandle
->
viewport
.
width
,
m_pHandle
->
viewport
.
height
);
return
Graphic
(
aBitmap
).
GetXGraphic
();
return
Graphic
(
aBitmap
).
GetXGraphic
();
}
}
...
...
avmedia/source/opengl/oglplayer.cxx
Dosyayı görüntüle @
b4b10fc8
...
@@ -25,7 +25,6 @@ namespace avmedia { namespace ogl {
...
@@ -25,7 +25,6 @@ namespace avmedia { namespace ogl {
OGLPlayer
::
OGLPlayer
()
OGLPlayer
::
OGLPlayer
()
:
Player_BASE
(
m_aMutex
)
:
Player_BASE
(
m_aMutex
)
,
m_pHandle
(
NULL
)
,
m_pHandle
(
NULL
)
,
m_bIsPlayingTmp
(
false
)
{
{
}
}
...
@@ -102,20 +101,18 @@ void SAL_CALL OGLPlayer::start() throw ( uno::RuntimeException, std::exception )
...
@@ -102,20 +101,18 @@ void SAL_CALL OGLPlayer::start() throw ( uno::RuntimeException, std::exception )
{
{
osl
::
MutexGuard
aGuard
(
m_aMutex
);
osl
::
MutexGuard
aGuard
(
m_aMutex
);
gltf_animation_start
(
m_pHandle
);
gltf_animation_start
(
m_pHandle
);
m_bIsPlayingTmp
=
true
;
}
}
void
SAL_CALL
OGLPlayer
::
stop
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
void
SAL_CALL
OGLPlayer
::
stop
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
{
osl
::
MutexGuard
aGuard
(
m_aMutex
);
osl
::
MutexGuard
aGuard
(
m_aMutex
);
gltf_animation_stop
(
m_pHandle
);
gltf_animation_stop
(
m_pHandle
);
m_bIsPlayingTmp
=
false
;
}
}
sal_Bool
SAL_CALL
OGLPlayer
::
isPlaying
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
sal_Bool
SAL_CALL
OGLPlayer
::
isPlaying
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
{
osl
::
MutexGuard
aGuard
(
m_aMutex
);
osl
::
MutexGuard
aGuard
(
m_aMutex
);
return
m_bIsPlayingTmp
;
//(sal_Bool)gltf_animation_is_playing(m_pHandle)
return
(
sal_Bool
)
gltf_animation_is_playing
(
m_pHandle
);
}
}
double
SAL_CALL
OGLPlayer
::
getDuration
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
double
SAL_CALL
OGLPlayer
::
getDuration
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
...
@@ -139,7 +136,7 @@ double SAL_CALL OGLPlayer::getMediaTime() throw ( ::com::sun::star::uno::Runtime
...
@@ -139,7 +136,7 @@ double SAL_CALL OGLPlayer::getMediaTime() throw ( ::com::sun::star::uno::Runtime
double
SAL_CALL
OGLPlayer
::
getRate
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
double
SAL_CALL
OGLPlayer
::
getRate
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
{
osl
::
MutexGuard
aGuard
(
m_aMutex
);
osl
::
MutexGuard
aGuard
(
m_aMutex
);
//
TODO: Get the speed of stream reading (see com::sun::star::media::XPlayer)
//
Seems unused
return
1.0
;
return
1.0
;
}
}
...
@@ -179,7 +176,7 @@ sal_Bool SAL_CALL OGLPlayer::isMute() throw ( uno::RuntimeException, std::except
...
@@ -179,7 +176,7 @@ sal_Bool SAL_CALL OGLPlayer::isMute() throw ( uno::RuntimeException, std::except
awt
::
Size
SAL_CALL
OGLPlayer
::
getPreferredPlayerWindowSize
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
awt
::
Size
SAL_CALL
OGLPlayer
::
getPreferredPlayerWindowSize
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
{
return
awt
::
Size
(
480
,
360
);
// TODO: It will be good for OpenGL too?
return
awt
::
Size
(
480
,
360
);
}
}
uno
::
Reference
<
media
::
XPlayerWindow
>
SAL_CALL
OGLPlayer
::
createPlayerWindow
(
const
uno
::
Sequence
<
uno
::
Any
>&
rArguments
)
uno
::
Reference
<
media
::
XPlayerWindow
>
SAL_CALL
OGLPlayer
::
createPlayerWindow
(
const
uno
::
Sequence
<
uno
::
Any
>&
rArguments
)
...
@@ -215,7 +212,7 @@ uno::Reference< media::XFrameGrabber > SAL_CALL OGLPlayer::createFrameGrabber()
...
@@ -215,7 +212,7 @@ uno::Reference< media::XFrameGrabber > SAL_CALL OGLPlayer::createFrameGrabber()
m_pHandle
->
viewport
.
height
=
getPreferredPlayerWindowSize
().
Height
;
m_pHandle
->
viewport
.
height
=
getPreferredPlayerWindowSize
().
Height
;
gltf_renderer_set_content
(
m_pHandle
);
gltf_renderer_set_content
(
m_pHandle
);
OGLFrameGrabber
*
pFrameGrabber
=
new
OGLFrameGrabber
(
m_pHandle
);
OGLFrameGrabber
*
pFrameGrabber
=
new
OGLFrameGrabber
(
m_pHandle
);
return
uno
::
Reference
<
media
::
XFrameGrabber
>
(
pFrameGrabber
);
;
return
uno
::
Reference
<
media
::
XFrameGrabber
>
(
pFrameGrabber
);
}
}
OUString
SAL_CALL
OGLPlayer
::
getImplementationName
()
OUString
SAL_CALL
OGLPlayer
::
getImplementationName
()
...
...
avmedia/source/opengl/oglplayer.hxx
Dosyayı görüntüle @
b4b10fc8
...
@@ -58,7 +58,6 @@ private:
...
@@ -58,7 +58,6 @@ private:
OUString
m_sURL
;
OUString
m_sURL
;
glTFHandle
*
m_pHandle
;
glTFHandle
*
m_pHandle
;
OpenGLContext
m_aContext
;
OpenGLContext
m_aContext
;
bool
m_bIsPlayingTmp
;
// Temporarly while libgltf does not implement the corresponding methods
};
};
}
// namespace ogl
}
// namespace ogl
...
...
avmedia/source/opengl/oglwindow.cxx
Dosyayı görüntüle @
b4b10fc8
...
@@ -30,7 +30,9 @@ void SAL_CALL OGLWindow::update() throw (css::uno::RuntimeException, std::except
...
@@ -30,7 +30,9 @@ void SAL_CALL OGLWindow::update() throw (css::uno::RuntimeException, std::except
{
{
m_pContext
->
makeCurrent
();
m_pContext
->
makeCurrent
();
gltf_renderer_set_content
(
m_pHandle
);
gltf_renderer_set_content
(
m_pHandle
);
gltf_prepare_renderer
(
m_pHandle
);
gltf_renderer
(
m_pHandle
);
gltf_renderer
(
m_pHandle
);
gltf_complete_renderer
();
m_pContext
->
swapBuffers
();
m_pContext
->
swapBuffers
();
}
}
...
...
download.lst
Dosyayı görüntüle @
b4b10fc8
...
@@ -88,7 +88,7 @@ export JPEG_TARBALL := 52654eb3b2e60c35731ea8fc87f1bd29-jpegsrc.v8d.tar.gz
...
@@ -88,7 +88,7 @@ export JPEG_TARBALL := 52654eb3b2e60c35731ea8fc87f1bd29-jpegsrc.v8d.tar.gz
export LANGUAGETOOL_TARBALL := b63e6340a02ff1cacfeadb2c42286161-JLanguageTool-1.7.0.tar.bz2
export LANGUAGETOOL_TARBALL := b63e6340a02ff1cacfeadb2c42286161-JLanguageTool-1.7.0.tar.bz2
export LCMS2_TARBALL := 861ef15fa0bc018f9ddc932c4ad8b6dd-lcms2-2.4.tar.gz
export LCMS2_TARBALL := 861ef15fa0bc018f9ddc932c4ad8b6dd-lcms2-2.4.tar.gz
export LIBEXTTEXTCAT_TARBALL := ae330b9493bd4503ac390106ff6060d7-libexttextcat-3.4.3.tar.bz2
export LIBEXTTEXTCAT_TARBALL := ae330b9493bd4503ac390106ff6060d7-libexttextcat-3.4.3.tar.bz2
export LIBGLTF_TARBALL :=
8ac8ae9829c4fefd1ae9f715f95d4e0b-libgltf.tar.gz
export LIBGLTF_TARBALL :=
1c366663a8d54d570b8b2f90784814d9-libgltf.tar.bz2
export LIBLANGTAG_TARBALL := 36271d3fa0d9dec1632029b6d7aac925-liblangtag-0.5.1.tar.bz2
export LIBLANGTAG_TARBALL := 36271d3fa0d9dec1632029b6d7aac925-liblangtag-0.5.1.tar.bz2
export LIBXMLSEC_TARBALL := 1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
export LIBXMLSEC_TARBALL := 1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
export LIBXML_TARBALL := 9c0cfef285d5c4a5c80d00904ddab380-libxml2-2.9.1.tar.gz
export LIBXML_TARBALL := 9c0cfef285d5c4a5c80d00904ddab380-libxml2-2.9.1.tar.gz
...
...
external/libgltf/UnpackedTarball_libgltf.mk
Dosyayı görüntüle @
b4b10fc8
...
@@ -18,15 +18,15 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libgltf,1))
...
@@ -18,15 +18,15 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libgltf,1))
$(eval $(call gb_UnpackedTarball_add_patches,libgltf,\
$(eval $(call gb_UnpackedTarball_add_patches,libgltf,\
external/libgltf/patches/include_path_glew.patch \
external/libgltf/patches/include_path_glew.patch \
external/libgltf/patches/include_path_freetype.patch \
external/libgltf/patches/include_path_freetype.patch \
external/libgltf/patches/
missing_include_cstring
.patch \
external/libgltf/patches/
typedef_used_as_struct
.patch \
external/libgltf/patches/
win_only_variables
.patch \
external/libgltf/patches/
avoid_c++11_copy_filestream
.patch \
external/libgltf/patches/unneeded_context_handling.patch \
external/libgltf/patches/unneeded_context_handling.patch \
external/libgltf/patches/include_typo_texture.patch \
external/libgltf/patches/win_only_variables.patch \
external/libgltf/patches/adress_of_temporary.patch \
external/libgltf/patches/constify_for_temporaries.patch \
external/libgltf/patches/avoid_c++11.patch \
external/libgltf/patches/json_charbuffer_used_as_cstring.patch \
external/libgltf/patches/shader_charbuffer_used_as_cstring.patch \
external/libgltf/patches/shader_charbuffer_used_as_cstring.patch \
external/libgltf/patches/format_parameter_for_bitmap.patch \
external/libgltf/patches/get_bitmap_new_syntax.patch \
external/libgltf/patches/remove_extra_include.patch \
external/libgltf/patches/fmod_error_handling.patch \
))
))
# vim: set noet sw=4 ts=4:
# vim: set noet sw=4 ts=4:
external/libgltf/patches/adress_of_temporary.patch
deleted
100644 → 0
Dosyayı görüntüle @
0ece50a4
diff -ur libgltf.org/src/FPSCounter.cpp libgltf/src/FPSCounter.cpp
--- libgltf.org/src/FPSCounter.cpp 2014-04-18 12:21:54.655972783 +0200
+++ libgltf/src/FPSCounter.cpp 2014-04-18 12:22:25.280971654 +0200
@@ -107,7 +107,8 @@
glUseProgram(uiFPSProgram);
glDisable(GL_DEPTH_TEST);
GLuint iLoc = glGetUniformLocation(uiFPSProgram, "matrices.projMatrix");
- glUniformMatrix4fv(iLoc, 1,false, (GLfloat*)(&glm::ortho(0.0f, float(pViewport->width), 0.0f, float(pViewport->height))));
+ const glm::mat4 aMat = glm::ortho(0.0f, float(pViewport->width), 0.0f, float(pViewport->height));
+ glUniformMatrix4fv(iLoc, 1,false, glm::value_ptr(aMat));
glm::vec4 lightVector = glm::vec4(1.0f, 1.0f, 1.0f, 1.0f);
iLoc = glGetUniformLocation(uiFPSProgram, "vColor");
glUniform4fv(iLoc, 1, (GLfloat*)&lightVector);
external/libgltf/patches/avoid_c++11.patch
deleted
100644 → 0
Dosyayı görüntüle @
0ece50a4
diff -ur libgltf.org/src/Shaders.cpp libgltf/src/Shaders.cpp
--- libgltf.org/src/Shaders.cpp 2014-04-18 13:47:18.006783834 +0200
+++ libgltf/src/Shaders.cpp 2014-04-18 13:49:20.175779328 +0200
@@ -219,7 +219,7 @@
bool ShaderProgram::readShaderFile(const std::string& fileName, std::string& value)
{
- std::ifstream shaderStream(fileName, std::ios::in);
+ std::ifstream shaderStream(fileName.c_str(), std::ios::in);
if (!shaderStream.is_open())
{
return false;
external/libgltf/patches/avoid_c++11_copy_filestream.patch
0 → 100644
Dosyayı görüntüle @
b4b10fc8
diff -ur libgltf.org/src/FPSCounter.h libgltf/src/FPSCounter.h
--- libgltf.org/src/FPSCounter.h 2014-05-05 14:36:38.983373597 +0200
+++ libgltf/src/FPSCounter.h 2014-05-05 14:40:20.327383038 +0200
@@ -70,7 +70,7 @@
#endif
#if WRITEFPS2FILE
- FPSFile = ofstream("./FPSCounter.txt");
+ FPSFile.open("./FPSCounter.txt");
#endif
}
~FPSCounter()
external/libgltf/patches/constify_for_temporaries.patch
0 → 100644
Dosyayı görüntüle @
b4b10fc8
diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
--- libgltf.org/src/RenderScene.cpp 2014-05-05 14:45:21.447395883 +0200
+++ libgltf/src/RenderScene.cpp 2014-05-05 14:47:14.819400718 +0200
@@ -776,7 +776,7 @@
return;
}
-void RenderScene::updateBoneMatrix(Bone* pBone, glm::mat4& matrix)
+void RenderScene::updateBoneMatrix(Bone* pBone, const glm::mat4& matrix)
{
if (0 == pBone)
{
diff -ur libgltf.org/src/RenderScene.h libgltf/src/RenderScene.h
--- libgltf.org/src/RenderScene.h 2014-05-05 14:45:21.447395883 +0200
+++ libgltf/src/RenderScene.h 2014-05-05 14:47:48.111402138 +0200
@@ -170,7 +170,7 @@
void renderPrimitive(class RenderPrimitive* pPrimitive);
void updateJointInfo(Bone* pBone);
- void updateBoneMatrix(Bone* pBone, glm::mat4& matrix);
+ void updateBoneMatrix(Bone* pBone, const glm::mat4& matrix);
glm::mat4* calcProjectionMatrix();
glm::vec3* calcLightColor();
external/libgltf/patches/extra_qualification.patch
deleted
100644 → 0
Dosyayı görüntüle @
0ece50a4
diff -ur libgltf.org/Common.h libgltf/Common.h
--- libgltf.org/Common.h 2014-04-17 14:24:31.978887883 +0200
+++ libgltf/Common.h 2014-04-17 14:24:57.505886942 +0200
@@ -551,7 +551,7 @@
std::map<std::string, class Technique*>& getTechniqueMap();
const std::string getCameraIndex() const;
- const float* Scene::getCameraMatrix() const;
+ const float* getCameraMatrix() const;
char* getBuffer(unsigned int length);
bool setBuffer(const std::string& binName, unsigned int length);
external/libgltf/patches/fmod_error_handling.patch
0 → 100644
Dosyayı görüntüle @
b4b10fc8
diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
--- libgltf.org/src/RenderScene.cpp 2014-05-06 12:01:08.204238237 +0200
+++ libgltf/src/RenderScene.cpp 2014-05-06 12:21:58.720287272 +0200
@@ -979,7 +979,9 @@
double RenderScene::getAnimTime()
{
- return fmod(this->mCurrentTime, this->mDuration);
+ errno = 0;
+ double time = fmod(this->mCurrentTime, this->mDuration);
+ return errno == EDOM ? 0.0 : time;
}
void RenderScene::setAnimLoop(int loop)
external/libgltf/patches/
format_parameter_for_bitmap
.patch
→
external/libgltf/patches/
get_bitmap_new_syntax
.patch
Dosyayı görüntüle @
b4b10fc8
diff -ur libgltf.org/inc/libgltf.h libgltf/inc/libgltf.h
diff -ur libgltf.org/inc/libgltf.h libgltf/inc/libgltf.h
--- libgltf.org/inc/libgltf.h 2014-04-27 14:10:06.191988313 +0200
--- libgltf.org/inc/libgltf.h 2014-05-06 11:56:54.756228299 +0200
+++ libgltf/inc/libgltf.h 2014-04-27 14:12:03.171983919 +0200
+++ libgltf/inc/libgltf.h 2014-05-06 11:57:55.104230666 +0200
@@ -47,7 +47,7 @@
@@ -10,6 +10,7 @@
#include <stddef.h>
#include "types.h"
#include "Common.h"
+#include <GL/glew.h>
#include <glm/glm.hpp>
using namespace glTF;
@@ -66,7 +67,7 @@
/** Get a bitmap of the screen in the given point in time. */
/** Get a bitmap of the screen in the given point in time. */
extern "C"
extern "C"
void gltf_renderer_get_bitmap(glTFHandle *handle, double time,
void gltf_renderer_get_bitmap(glTFHandle *handle, double time,
- char* buffer, long width, long height);
- char* buffer, long width, long height);
+ char* buffer,
long width, long height,
GLenum format);
+ char* buffer, GLenum format);
/** Start playing the glTF animation to the current openGLcontext. */
/** Start playing the glTF animation to the current openGLcontext. */
extern "C"
extern "C"
@@ -80,4 +80,4 @@
/** Query where exactly the animation is, in seconds. */
extern "C"
double gltf_animation_get_time(glTFHandle *handle);
-#endif
\ No newline at end of file
+#endif
diff -ur libgltf.org/src/libgltf.cpp libgltf/src/libgltf.cpp
diff -ur libgltf.org/src/libgltf.cpp libgltf/src/libgltf.cpp
--- libgltf.org/src/libgltf.cpp 2014-0
4-27 14:10:06.192988313
+0200
--- libgltf.org/src/libgltf.cpp 2014-0
5-06 11:56:54.756228299
+0200
+++ libgltf/src/libgltf.cpp 2014-0
4-27 14:12:06.648983788
+0200
+++ libgltf/src/libgltf.cpp 2014-0
5-06 11:57:00.620228529
+0200
@@ -
70,10 +70
,10 @@
@@ -
95,10 +95
,10 @@
extern "C"
extern "C"
void gltf_renderer_get_bitmap(glTFHandle *handle, double time,
void gltf_renderer_get_bitmap(glTFHandle *handle, double time,
- char* buffer, long width, long height)
- char* buffer, long width, long height)
+ char* buffer,
long width, long height,
GLenum format)
+ char* buffer, GLenum format)
{
{
class
RenderScene* renderScene = (RenderScene*)handle->renderer;
RenderScene* renderScene = (RenderScene*)handle->renderer;
- renderScene->renderToBuffer(&(handle->viewport), (unsigned char*)buffer);
- renderScene->renderToBuffer(&(handle->viewport), (unsigned char*)buffer);
+ renderScene->renderToBuffer(&(handle->viewport), (unsigned char*)buffer, format);
+ renderScene->renderToBuffer(&(handle->viewport), (unsigned char*)buffer, format);
return;
return;
}
}
diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
--- libgltf.org/src/RenderScene.cpp 2014-0
4-27 14:10:06.192988313
+0200
--- libgltf.org/src/RenderScene.cpp 2014-0
5-06 11:56:54.756228299
+0200
+++ libgltf/src/RenderScene.cpp 2014-0
4-27 14:11:03.199986172
+0200
+++ libgltf/src/RenderScene.cpp 2014-0
5-06 11:57:03.852228656
+0200
@@ -
630,7 +630
,7 @@
@@ -
859,7 +859
,7 @@
return
p
Camera;
return
s
Camera;
}
}
-void RenderScene::renderToBuffer(glTFViewport* pViewport, unsigned char * buffer)
-void RenderScene::renderToBuffer(glTFViewport* pViewport, unsigned char * buffer)
...
@@ -45,7 +46,7 @@ diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
...
@@ -45,7 +46,7 @@ diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
{
{
createRenderObj(pViewport->width, pViewport->height);
createRenderObj(pViewport->width, pViewport->height);
createTextureObj(pViewport->width, pViewport->height);
createTextureObj(pViewport->width, pViewport->height);
@@ -
647,7 +647
,7 @@
@@ -
876,7 +876
,7 @@
GLenum fbResult = glCheckFramebufferStatus(GL_FRAMEBUFFER);
GLenum fbResult = glCheckFramebufferStatus(GL_FRAMEBUFFER);
if( fbResult != GL_FRAMEBUFFER_COMPLETE )
if( fbResult != GL_FRAMEBUFFER_COMPLETE )
result = false;
result = false;
...
@@ -55,14 +56,14 @@ diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
...
@@ -55,14 +56,14 @@ diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glDeleteFramebuffers(1, &mFBOID);
glDeleteFramebuffers(1, &mFBOID);
diff -ur libgltf.org/src/RenderScene.h libgltf/src/RenderScene.h
diff -ur libgltf.org/src/RenderScene.h libgltf/src/RenderScene.h
--- libgltf.org/src/RenderScene.h 2014-04-27 14:10:06.192988313 +0200
--- libgltf.org/src/RenderScene.h 2014-05-06 11:56:54.756228299 +0200
+++ libgltf/src/RenderScene.h 2014-04-27 14:13:41.291980233 +0200
+++ libgltf/src/RenderScene.h 2014-05-06 11:57:01.524228565 +0200
@@ -91,7 +91,7 @@
@@ -124,7 +124,7 @@
void render(void* lpParam);
void releaseRender(void* lpParam);
void releaseRender(void* lpParam);
CPhysicalCamera* getCamera();
// For bitmap
- void renderToBuffer(glTFViewport* pViewpoit, unsigned char * buffer);
- void renderToBuffer(glTFViewport* pViewpoit, unsigned char * buffer);
+ void renderToBuffer(glTFViewport* pViewpoit, unsigned char * buffer, GLenum format);
+ void renderToBuffer(glTFViewport* pViewpoit, unsigned char * buffer, GLenum format);
void renderRotateCamera(double horizontal, double vertical,
double planar, double time);
// For animation
void
renderMoveCamera(double x, double y, double z, double time
);
void
startAnimation(
);
external/libgltf/patches/include_path_freetype.patch
Dosyayı görüntüle @
b4b10fc8
diff -ur libgltf.org/src/Font.h libgltf/src/Font.h
diff -ur libgltf.org/src/Font.h libgltf/src/Font.h
--- libgltf.org/src/Font.h 2014-0
4-18 12:07:57.57300365
5 +0200
--- libgltf.org/src/Font.h 2014-0
5-05 14:35:24.15537040
5 +0200
+++ libgltf/src/Font.h 2014-0
4-18 12:08:22.202002747
+0200
+++ libgltf/src/Font.h 2014-0
5-05 14:35:39.715371069
+0200
@@ -8,7 +8,7 @@
@@ -8,7 +8,7 @@
#ifndef FONT_H
#ifndef FONT_H
#define FONT_H
#define FONT_H
...
@@ -10,3 +10,10 @@ diff -ur libgltf.org/src/Font.h libgltf/src/Font.h
...
@@ -10,3 +10,10 @@ diff -ur libgltf.org/src/Font.h libgltf/src/Font.h
#include FT_FREETYPE_H
#include FT_FREETYPE_H
#include "Texture.h"
#include "Texture.h"
@@ -49,4 +49,4 @@
FT_Face mFTFace;
unsigned int mShaderId;
};
-#endif
\ No newline at end of file
+#endif
external/libgltf/patches/include_path_glew.patch
Dosyayı görüntüle @
b4b10fc8
diff -ur libgltf.org/src/Camera.h libgltf/src/Camera.h
diff -ur libgltf.org/src/Camera.h libgltf/src/Camera.h
--- libgltf.org/src/Camera.h 2014-0
4-18 12:05:38.34300879
0 +0200
--- libgltf.org/src/Camera.h 2014-0
5-05 14:26:11.91134685
0 +0200
+++ libgltf/src/Camera.h 2014-0
4-18 12:05:50.331008348
+0200
+++ libgltf/src/Camera.h 2014-0
5-05 14:27:07.295349212
+0200
@@ -8,7 +8,7 @@
@@ -8,7 +8,7 @@
#ifndef CAMERA_H
#ifndef CAMERA_H
#define CAMERA_H
#define CAMERA_H
...
@@ -10,9 +10,16 @@ diff -ur libgltf.org/src/Camera.h libgltf/src/Camera.h
...
@@ -10,9 +10,16 @@ diff -ur libgltf.org/src/Camera.h libgltf/src/Camera.h
#include <glm/glm.hpp>
#include <glm/glm.hpp>
class CPhysicalCamera
class CPhysicalCamera
@@ -45,4 +45,4 @@
int iForw, iBack, iLeft, iRight;
};
-#endif
\ No newline at end of file
+#endif
diff -ur libgltf.org/src/Common.h libgltf/src/Common.h
diff -ur libgltf.org/src/Common.h libgltf/src/Common.h
--- libgltf.org/src/Common.h 2014-0
4-18 12:05:38.34300879
0 +0200
--- libgltf.org/src/Common.h 2014-0
5-05 14:26:11.91134685
0 +0200
+++ libgltf/src/Common.h 2014-0
4-18 12:05:52.245008277
+0200
+++ libgltf/src/Common.h 2014-0
5-05 14:27:18.927349708
+0200
@@ -7,7 +7,7 @@
@@ -7,7 +7,7 @@
*/
*/
#ifndef COMMON_H
#ifndef COMMON_H
...
@@ -23,8 +30,8 @@ diff -ur libgltf.org/src/Common.h libgltf/src/Common.h
...
@@ -23,8 +30,8 @@ diff -ur libgltf.org/src/Common.h libgltf/src/Common.h
#include <string>
#include <string>
#include <vector>
#include <vector>
diff -ur libgltf.org/src/Shaders.h libgltf/src/Shaders.h
diff -ur libgltf.org/src/Shaders.h libgltf/src/Shaders.h
--- libgltf.org/src/Shaders.h 2014-0
4-18 12:05:38.34300879
0 +0200
--- libgltf.org/src/Shaders.h 2014-0
5-05 14:26:11.92334685
0 +0200
+++ libgltf/src/Shaders.h 2014-0
4-18 12:06:02.907007884
+0200
+++ libgltf/src/Shaders.h 2014-0
5-05 14:27:45.483350841
+0200
@@ -8,7 +8,7 @@
@@ -8,7 +8,7 @@
#ifndef SHADERS_H
#ifndef SHADERS_H
#define SHADERS_H
#define SHADERS_H
...
@@ -35,14 +42,14 @@ diff -ur libgltf.org/src/Shaders.h libgltf/src/Shaders.h
...
@@ -35,14 +42,14 @@ diff -ur libgltf.org/src/Shaders.h libgltf/src/Shaders.h
#include <string>
#include <string>
diff -ur libgltf.org/src/Texture.h libgltf/src/Texture.h
diff -ur libgltf.org/src/Texture.h libgltf/src/Texture.h
--- libgltf.org/src/Texture.h 2014-0
4-18 12:05:38.34300879
0 +0200
--- libgltf.org/src/Texture.h 2014-0
5-05 14:26:11.91134685
0 +0200
+++ libgltf/src/Texture.h 2014-0
4-18 12:06:06.390007755
+0200
+++ libgltf/src/Texture.h 2014-0
5-05 14:27:52.927351158
+0200
@@ -1
0,7 +10
,7 @@
@@ -1
1,7 +11
,7 @@
#include <string>
#include <string>
#include <vector>
#include <vector>
#include <map>
#include <map>
-#include <glew/glew.h>
-#include <glew/glew.h>
+#include <GL/glew.h>
+#include <GL/glew.h>
#include <glm/glm.hpp>
#include <glm/glm.hpp>
using namespace std;
using namespace std;
external/libgltf/patches/include_typo_texture.patch
deleted
100644 → 0
Dosyayı görüntüle @
0ece50a4
diff -ur libgltf.org/src/Texture.cpp libgltf/src/Texture.cpp
--- libgltf.org/src/Texture.cpp 2014-04-18 12:19:41.806977683 +0200
+++ libgltf/src/Texture.cpp 2014-04-18 12:20:08.065976714 +0200
@@ -5,7 +5,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include "texture.h"
+#include "Texture.h"
Texture::Texture()
{
external/libgltf/patches/json_charbuffer_used_as_cstring.patch
deleted
100644 → 0
Dosyayı görüntüle @
0ece50a4
diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
--- libgltf.org/src/RenderScene.cpp 2014-04-18 13:52:31.148772285 +0200
+++ libgltf/src/RenderScene.cpp 2014-04-18 15:08:15.001604707 +0200
@@ -211,7 +211,7 @@
{
if(0 == jsonfile)
return 0;
- string tmpStr(jsonfile->buffer);
+ string tmpStr(jsonfile->buffer,jsonfile->size);
loadJson.setJsonInfo(tmpStr);
if (!loadJson.parseJsonFile())
return 0;
external/libgltf/patches/missing_include_cstring.patch
deleted
100644 → 0
Dosyayı görüntüle @
0ece50a4
diff -ur libgltf.org/src/Common.cpp libgltf/src/Common.cpp
--- libgltf.org/src/Common.cpp 2014-04-18 12:09:30.459000229 +0200
+++ libgltf/src/Common.cpp 2014-04-18 12:09:51.643999448 +0200
@@ -6,6 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "Common.h"
+#include <cstring>
namespace glTF
{
external/libgltf/patches/remove_extra_include.patch
0 → 100644
Dosyayı görüntüle @
b4b10fc8
diff -ur libgltf.org/inc/libgltf.h libgltf/inc/libgltf.h
--- libgltf.org/inc/libgltf.h 2014-05-06 11:59:40.224234787 +0200
+++ libgltf/inc/libgltf.h 2014-05-06 12:00:15.192236159 +0200
@@ -9,7 +9,6 @@
#define LIBGLTF_H
#include <stddef.h>
#include "types.h"
-#include "Common.h"
#include <GL/glew.h>
#include <glm/glm.hpp>
using namespace glTF;
external/libgltf/patches/shader_charbuffer_used_as_cstring.patch
Dosyayı görüntüle @
b4b10fc8
diff -ur libgltf.org/src/Common.cpp libgltf/src/Common.cpp
diff -ur libgltf.org/src/Common.cpp libgltf/src/Common.cpp
--- libgltf.org/src/Common.cpp 2014-0
4-20 10:46:20.065036606
+0200
--- libgltf.org/src/Common.cpp 2014-0
5-05 15:02:17.155439207
+0200
+++ libgltf/src/Common.cpp 2014-0
4-20 12:12:26.940821223
+0200
+++ libgltf/src/Common.cpp 2014-0
5-05 15:04:25.631444687
+0200
@@ -5
21,8 +521
,10 @@
@@ -5
18,8 +518
,10 @@
if(vShaderIdx >= 0 && fShaderIdx >= 0)
if(vShaderIdx >= 0 && fShaderIdx >= 0)
{
{
const char* pvShader = pGltfHandle->files[vShaderIdx]->buffer;
const char* pvShader = pGltfHandle->files[vShaderIdx]->buffer;
...
@@ -14,10 +14,10 @@ diff -ur libgltf.org/src/Common.cpp libgltf/src/Common.cpp
...
@@ -14,10 +14,10 @@ diff -ur libgltf.org/src/Common.cpp libgltf/src/Common.cpp
if (0 != mProgramId)
if (0 != mProgramId)
{
{
diff -ur libgltf.org/src/Shaders.cpp libgltf/src/Shaders.cpp
diff -ur libgltf.org/src/Shaders.cpp libgltf/src/Shaders.cpp
--- libgltf.org/src/Shaders.cpp 2014-0
4-20 10:46:20.065036606
+0200
--- libgltf.org/src/Shaders.cpp 2014-0
5-05 15:02:17.155439207
+0200
+++ libgltf/src/Shaders.cpp 2014-0
4-20 12:15:42.683813064
+0200
+++ libgltf/src/Shaders.cpp 2014-0
5-05 15:09:30.143457676
+0200
@@ -1
10,12 +110
,12 @@
@@ -1
05,12 +105
,12 @@
return programId;
return programId;
}
}
-unsigned int ShaderProgram::createProgram(const char* pvShader, const char* pfShader)
-unsigned int ShaderProgram::createProgram(const char* pvShader, const char* pfShader)
...
@@ -32,17 +32,17 @@ diff -ur libgltf.org/src/Shaders.cpp libgltf/src/Shaders.cpp
...
@@ -32,17 +32,17 @@ diff -ur libgltf.org/src/Shaders.cpp libgltf/src/Shaders.cpp
return 0;
return 0;
return programId;
return programId;
@@ -1
42,7 +142
,7 @@
@@ -1
37,7 +137
,7 @@
return false;
return false;
}
}
-
if (!compileShader(shaderCode.c_str(), shaderId))
-
if (!compileShader(shaderCode.c_str(), shaderId))
+
if (!compileShader(shaderCode.c_str(), shader.length(), shaderId))
+
if (!compileShader(shaderCode.c_str(), shader.length(), shaderId))
{
{
std::cout << "compileShader : compileShader failed." << std::endl;
std::cout << "compileShader : compileShader failed." << std::endl;
return false;
return false;
@@ -15
8,11 +158
,11 @@
@@ -15
3,11 +153
,11 @@
return true;
return true;
}
}
-bool ShaderProgram::loadShader(unsigned int programId, const char* pShader, int type)
-bool ShaderProgram::loadShader(unsigned int programId, const char* pShader, int type)
...
@@ -55,22 +55,22 @@ diff -ur libgltf.org/src/Shaders.cpp libgltf/src/Shaders.cpp
...
@@ -55,22 +55,22 @@ diff -ur libgltf.org/src/Shaders.cpp libgltf/src/Shaders.cpp
{
{
std::cout << "compileShader : compileShader failed." << std::endl;
std::cout << "compileShader : compileShader failed." << std::endl;
return false;
return false;
@@ -17
8,9 +178
,10 @@
@@ -17
3,9 +173
,10 @@
return true;
return true;
}
}
-bool ShaderProgram::compileShader(const char* pShader, unsigned int shaderId)
-bool ShaderProgram::compileShader(const char* pShader, unsigned int shaderId)
+bool ShaderProgram::compileShader(const char* pShader, size_t iSize, unsigned int shaderId)
+bool ShaderProgram::compileShader(const char* pShader, size_t iSize, unsigned int shaderId)
{
{
-
glShaderSource(shaderId, 1, &pShader, NULL);
-
glShaderSource(shaderId, 1, &pShader, NULL);
+
GLint iGLSize = iSize;
+
GLint iGLSize = iSize;
+
glShaderSource(shaderId, 1, &pShader, &iGLSize);
+
glShaderSource(shaderId, 1, &pShader, &iGLSize);
glCompileShader(shaderId);
glCompileShader(shaderId);
int iStatus = 0;
int iStatus = 0;
glGetShaderiv(shaderId, GL_COMPILE_STATUS, &iStatus);
glGetShaderiv(shaderId, GL_COMPILE_STATUS, &iStatus);
diff -ur libgltf.org/src/Shaders.h libgltf/src/Shaders.h
diff -ur libgltf.org/src/Shaders.h libgltf/src/Shaders.h
--- libgltf.org/src/Shaders.h 2014-0
4-20 10:46:20.065036606
+0200
--- libgltf.org/src/Shaders.h 2014-0
5-05 15:02:17.155439207
+0200
+++ libgltf/src/Shaders.h 2014-0
4-20 12:11:36.816823313
+0200
+++ libgltf/src/Shaders.h 2014-0
5-05 15:10:26.003460059
+0200
@@ -39,17 +39,17 @@
@@ -39,17 +39,17 @@
void setUniform(unsigned int uProgId, const char* name, const glm::mat4 mMatrix);
void setUniform(unsigned int uProgId, const char* name, const glm::mat4 mMatrix);
...
@@ -84,7 +84,7 @@ diff -ur libgltf.org/src/Shaders.h libgltf/src/Shaders.h
...
@@ -84,7 +84,7 @@ diff -ur libgltf.org/src/Shaders.h libgltf/src/Shaders.h
bool loadShader(unsigned int programId, const std::string& shaderName, int type);
bool loadShader(unsigned int programId, const std::string& shaderName, int type);
- bool loadShader(unsigned int programId, const char* pShader, int type);
- bool loadShader(unsigned int programId, const char* pShader, int type);
+ bool loadShader(unsigned int programId, const char* pShader, size_t iSize, int type);
+ bool loadShader(unsigned int programId, const char* pShader, size_t iSize, int type);
;
private:
private:
- bool compileShader(const char* pShader, unsigned int shaderId);
- bool compileShader(const char* pShader, unsigned int shaderId);
...
...
external/libgltf/patches/typedef_used_as_struct.patch
0 → 100644
Dosyayı görüntüle @
b4b10fc8
diff -ur libgltf.org/src/Common.h libgltf/src/Common.h
--- libgltf.org/src/Common.h 2014-05-05 14:31:00.483359159 +0200
+++ libgltf/src/Common.h 2014-05-05 14:34:02.055366903 +0200
@@ -536,8 +536,8 @@
unsigned int mCount;
double mMaxTime;
double mMinTime;
- std::vector<struct QuatKey> mTimeRorateVec;
- //std::vector<struct QuatKey> mTimeTransfromVec;
+ std::vector<QuatKey> mTimeRorateVec;
+ //std::vector<QuatKey> mTimeTransfromVec;
};
class Animation
external/libgltf/patches/unneeded_context_handling.patch
Dosyayı görüntüle @
b4b10fc8
diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
--- libgltf.org/src/RenderScene.cpp 2014-0
4-18 12:13:26.226991534
+0200
--- libgltf.org/src/RenderScene.cpp 2014-0
5-05 14:42:40.523389018
+0200
+++ libgltf/src/RenderScene.cpp 2014-0
4-18 12:13:46.133990800
+0200
+++ libgltf/src/RenderScene.cpp 2014-0
5-05 14:43:01.027389893
+0200
@@ -
587,8 +587
,6 @@
@@ -
746,7 +746
,6 @@
}
#if ENABLE_FPS
pFPSCounter->timeStampEnd(
);
pFPSCounter->printFPS(&viewport
);
pFPSCounter->printFPS(pViewport);
#endif
-
-
SwapBuffers(wglGetCurrentDC());
- SwapBuffers(wglGetCurrentDC())
;
return
;
}
}
void RenderScene::releaseRender(void* lpParam)
@@ -1004,4 +1003,4 @@
int RenderScene::isAnimPlay()
{
return this->mAnimationPlay ? 1 : 0;
-}
\ No newline at end of file
+}
external/libgltf/patches/win_only_variables.patch
Dosyayı görüntüle @
b4b10fc8
diff -ur libgltf.org/src/FPSCounter.cpp libgltf/src/FPSCounter.cpp
diff -ur libgltf.org/src/FPSCounter.cpp libgltf/src/FPSCounter.cpp
--- libgltf.org/src/FPSCounter.cpp 2014-0
4-18 12:10:37.031997774
+0200
--- libgltf.org/src/FPSCounter.cpp 2014-0
5-05 14:44:01.711392481
+0200
+++ libgltf/src/FPSCounter.cpp 2014-0
4-18 12:12:00.025994713
+0200
+++ libgltf/src/FPSCounter.cpp 2014-0
5-05 14:44:34.495393880
+0200
@@ -11
5,8 +115,10
@@
@@ -11
9,7 +119,9
@@
{
if (timeCounter>=TIMETHRESHOLD)
mFPS = getFPS();
{
mDurationTime = 0
;
FPSFile<<"FPS:"<<mFPS<<"\n"
;
+#ifdef _WIN32
+#ifdef _WIN32
mTotalTime = getExecutionTime();
FPSFile<<"Render Total Time: "<<mTotalTime*1000<<" ms"<<"Draw Time: "<<mGPUTime*1000<<" ms\n";
mGPUTime = mGPUDuration/dqFreq;
+#endif
+#endif
}
timeCounter = 0;
else
}
{
#endif
@@ -128,6 +130,8 @@
}
pFont->printFormattedString(20, pViewport->height-30, 20, "FPS: %d", mFPS);
+#ifdef _WIN32
pFont->printFormattedString(20, pViewport->height-60, 20, "Render Total Time: %.2f ms, Draw Time: %.2f ms", mTotalTime*1000,mGPUTime*1000);
+#endif
glEnable(GL_DEPTH_TEST);
-}
\ No newline at end of file
+}
diff -ur libgltf.org/src/FPSCounter.h libgltf/src/FPSCounter.h
--- libgltf.org/src/FPSCounter.h 2014-04-18 12:10:37.038997774 +0200
+++ libgltf/src/FPSCounter.h 2014-04-18 12:11:32.301995736 +0200
@@ -51,9 +51,11 @@
mFPS=0;
mDurationTime =0;
mGPUTime =0;
+#ifdef _WIN32
mTotalTime = 0;
QueryPerformanceFrequency(&f);
dqFreq=(double)f.QuadPart;
+#endif
}
~FPSCounter()
{
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