Update of /cvsroot/epfl/tgengine-0.1
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv686
Modified Files:
AUTHORS Makefile engine.cc engine.h glrenderer.cc
scenemanager.cc
Log Message:
capture video
Index: scenemanager.cc
===================================================================
RCS file: /cvsroot/epfl/tgengine-0.1/scenemanager.cc,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** scenemanager.cc 9 Nov 2004 18:19:04 -0000 1.14
--- scenemanager.cc 11 Nov 2004 10:34:01 -0000 1.15
***************
*** 223,227 ****
glColor3f(p->pColors[0]*0.4, p->pColors[1]*0.4, p->pColors[2]*0.4);
! Vector3 v = p->vPosition-pCamera->GetForward()*rad;
glVertex3fv(&v.x);
glColor3f(0,0,0);
--- 223,228 ----
glColor3f(p->pColors[0]*0.4, p->pColors[1]*0.4, p->pColors[2]*0.4);
! //Vector3 v = p->vPosition-pCamera->GetForward()*rad;
! Vector3 v = p->vPosition-pCamera->GetRotation().GetXAxis()*rad;
glVertex3fv(&v.x);
glColor3f(0,0,0);
Index: Makefile
===================================================================
RCS file: /cvsroot/epfl/tgengine-0.1/Makefile,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** Makefile 2 Nov 2004 15:32:15 -0000 1.13
--- Makefile 11 Nov 2004 10:34:01 -0000 1.14
***************
*** 17,20 ****
--- 17,23 ----
make -f Makefile.Linux "CFLAGS = -ggdb -DDEBUG -DTGLINUX"
+ linuxVideo:
+ make -f Makefile.Linux "CFLAGS = -DTGLINUX -DDEBUG -DTGVIDEO -I/root/ffmpeg-0.4.8/libavcodec/"
+
osx:
make -f Makefile.OSX
Index: engine.cc
===================================================================
RCS file: /cvsroot/epfl/tgengine-0.1/engine.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** engine.cc 6 Nov 2004 17:05:39 -0000 1.7
--- engine.cc 11 Nov 2004 10:34:01 -0000 1.8
***************
*** 11,14 ****
--- 11,18 ----
Endian* Engine::pEndian = NULL;
MeshManager* Engine::pMeshManager = new MeshManager ();
+ #ifdef TGVIDEO
+ Video* Engine::pVideo = NULL;
+ unsigned char* Engine::pVideoBuffer = NULL;
+ #endif
Engine::Engine (Timer* t)
***************
*** 97,100 ****
--- 101,109 ----
//"reelle" initialisation de l'affichage
ResizeScreen(800, 600, false, true);
+
+ #ifdef TGVIDEO
+ pVideo = new Video("video.mpg",800,600,16000000);
+ pVideoBuffer = new unsigned char[800 * 600 * 4];
+ #endif
Index: engine.h
===================================================================
RCS file: /cvsroot/epfl/tgengine-0.1/engine.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** engine.h 24 Oct 2004 14:51:54 -0000 1.5
--- engine.h 11 Nov 2004 10:34:01 -0000 1.6
***************
*** 40,43 ****
--- 40,47 ----
#include "meshmanager.h"
+ #ifdef TGVIDEO
+ #include "video.h"
+ #endif
+
namespace tg
{
***************
*** 66,69 ****
--- 70,77 ----
static Endian* pEndian;
static MeshManager* pMeshManager;
+ #ifdef TGVIDEO
+ static Video* pVideo;
+ static unsigned char* pVideoBuffer;
+ #endif
//static TextureManager* pTextureManager;
Index: AUTHORS
===================================================================
RCS file: /cvsroot/epfl/tgengine-0.1/AUTHORS,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** AUTHORS 31 Oct 2004 17:44:47 -0000 1.5
--- AUTHORS 11 Nov 2004 10:34:01 -0000 1.6
***************
*** 16,17 ****
--- 16,28 ----
Network Developement :
Luis Fernando "cerel" Couso Alonso : luis.couso *chez* epfl.ch
+
+ Code repris dans d'autres applications:
+ video.h & video.cc de Engine_0.2, Alexander Zaprjagaev <fr...@fr...> (GPL)
+ Quake II, pour certaines fonction de détection des collisions (GPL)
+ Le tutorial "Quake 3 BSP Collision Detection" de Nathan Ostgard ( http://www.devmaster.net/articles/quake3collision/ )
+ et beaucoup d'autres, ayant notamment servi d'inspiration:
+ Ogre3D,
+ CrystalSpace,
+ les articles de nehe.gamedev.net,
+ les articles de www.gametutorials.com,
+
Index: glrenderer.cc
===================================================================
RCS file: /cvsroot/epfl/tgengine-0.1/glrenderer.cc,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** glrenderer.cc 10 Nov 2004 21:02:04 -0000 1.16
--- glrenderer.cc 11 Nov 2004 10:34:01 -0000 1.17
***************
*** 436,439 ****
--- 436,448 ----
void GLRenderer::PostRender ()
{
+ #ifdef TGVIDEO
+ static float count = 0;
+ count += Engine::pEngine->GetTimer()->GetFPS();
+ if(count > 1.0 / 25.0) {
+ glReadPixels(0,0,800,600,GL_RGB,GL_UNSIGNED_BYTE,Engine::pVideoBuffer);
+ Engine::pVideo->save(Engine::pVideoBuffer,true);
+ count -= 1.0 / 25.0;
+ }
+ #endif
glFlush();
SDL_GL_SwapBuffers();
|