blob: 3a1329187f695a7880c4a1c028714e708d8357d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
--- libgltf.org/src/RenderScene.cpp 2014-05-06 18:26:20.097144491 +0200
+++ libgltf/src/RenderScene.cpp 2014-05-06 18:26:26.281144733 +0200
@@ -11,6 +11,7 @@
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtc/quaternion.hpp>
#include <glm/gtx/quaternion.hpp>
+#include <cerrno>
RenderPrimitive::RenderPrimitive()
: mVerterCount(0), mIndicesCount(0)
@@ -979,7 +980,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)
|