merge severin-lemaignan:for-upstream from github. This is a full rewrite of pyassimp, rendering it much easier to use.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1332 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2012-11-09 11:39:34 +00:00
parent 81aef90f4a
commit 4286c72e60
17 changed files with 976 additions and 1886 deletions

View File

@@ -11,6 +11,7 @@
// ----------------------------------------------------------------------------
#include <stdlib.h>
#include <stdio.h>
#include <GL/glut.h>
@@ -235,11 +236,23 @@ void recursive_render (const struct aiScene *sc, const struct aiNode* nd)
void do_motion (void)
{
static GLint prev_time = 0;
static GLint prev_fps_time = 0;
static int frames = 0;
int time = glutGet(GLUT_ELAPSED_TIME);
angle += (time-prev_time)*0.01;
prev_time = time;
frames += 1;
if ((time - prev_fps_time) > 1000) // update every seconds
{
int current_fps = frames * 1000 / (time - prev_fps_time);
printf("%d fps\n", current_fps);
frames = 0;
prev_fps_time = time;
}
glutPostRedisplay ();
}