You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(25) |
Oct
(64) |
Nov
(74) |
Dec
(22) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(14) |
| 2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Seb <whi...@us...> - 2004-10-01 20:25:21
|
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23909 Modified Files: Makefile Log Message: Change Makefile mac en Makefile osx ;-) Index: Makefile =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile 27 Sep 2004 21:34:05 -0000 1.6 --- Makefile 1 Oct 2004 20:24:04 -0000 1.7 *************** *** 17,24 **** make -f Makefile.Linux "CFLAGS = -ggdb -DDEBUG -DTGLINUX" ! mac: make -f Makefile.OSX ! macDebug: make -f Makefile.OSX "CFLAGS = -ggdb -DDEBUG -DTGOSX" --- 17,24 ---- make -f Makefile.Linux "CFLAGS = -ggdb -DDEBUG -DTGLINUX" ! osx: make -f Makefile.OSX ! osxDebug: make -f Makefile.OSX "CFLAGS = -ggdb -DDEBUG -DTGOSX" |
|
From: Seb <whi...@us...> - 2004-09-30 10:46:38
|
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23936 Modified Files: engine.cc Log Message: Detection des cartes ATI / GeForce2 Index: engine.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/engine.cc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** engine.cc 26 Sep 2004 13:15:07 -0000 1.1.1.1 --- engine.cc 30 Sep 2004 10:46:16 -0000 1.2 *************** *** 53,56 **** --- 53,61 ---- pRenderer = new GLRendererNV15(); } + else if (renderer.find("ATI") != std::string::npos) // On a une ATI (Seb) + { + Log ("ATI detectee, utilisation du rendu NV15"); + pRenderer = new GLRendererNV15(); + } else { |
|
From: julien r. <jul...@us...> - 2004-09-30 10:32:01
|
Update of /cvsroot/epfl/tggame In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20426 Modified Files: game.cc model.cc model.h Log Message: Index: game.cc =================================================================== RCS file: /cvsroot/epfl/tggame/game.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** game.cc 27 Sep 2004 13:34:27 -0000 1.4 --- game.cc 30 Sep 2004 10:31:42 -0000 1.5 *************** *** 45,51 **** if (scene) p->GetModel()->Add(pSceneManager); ! if (physic) p->GetModel()->Add(pPhysicEngine); ! if (p->GetCamera()) pPhysicEngine->AddNode(p->GetCamera()); } --- 45,51 ---- if (scene) p->GetModel()->Add(pSceneManager); ! if (physic && scene) p->GetModel()->Add(pPhysicEngine); ! if (p->GetCamera() && physic) pPhysicEngine->AddNode(p->GetCamera()); } *************** *** 63,67 **** pSceneManager->SetCamera(cam); vPawns.push_back(p); ! this->AddPawn(p, false, false); pLocalController = new PlayerController(p); vControllers.push_back(pLocalController); --- 63,67 ---- pSceneManager->SetCamera(cam); vPawns.push_back(p); ! this->AddPawn(p, true, false); pLocalController = new PlayerController(p); vControllers.push_back(pLocalController); *************** *** 75,79 **** Controller* c = new IAController(p); vControllers.push_back(c); ! p->SetPosition(pWorld->GetRandomStartPosition()+Vector3(20,70,20)); } --- 75,79 ---- Controller* c = new IAController(p); vControllers.push_back(c); ! p->SetPosition(pWorld->GetRandomStartPosition()+Vector3(0,70,0)); } Index: model.h =================================================================== RCS file: /cvsroot/epfl/tggame/model.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** model.h 28 Sep 2004 09:45:24 -0000 1.3 --- model.h 30 Sep 2004 10:31:42 -0000 1.4 *************** *** 11,16 **** enum eAnimations { ! MDL_ANIM_WALK, ! MDL_ANIM_JUMP }; --- 11,15 ---- enum eAnimations { ! MDL_ANIM_IDLE, }; *************** *** 18,22 **** enum eModelType { ! MDL_PLAYER=0 }; --- 17,22 ---- enum eModelType { ! MDL_PLAYER=0, ! MDL_ANIMATED_PLAYER=1 }; Index: model.cc =================================================================== RCS file: /cvsroot/epfl/tggame/model.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** model.cc 27 Sep 2004 13:34:27 -0000 1.2 --- model.cc 30 Sep 2004 10:31:42 -0000 1.3 *************** *** 30,37 **** //Chargement du mesh NEXT("mesh") pFD >> buffer; ! ! std::string meshname = "data/models/pinky/"; meshname += buffer; --- 30,40 ---- //Chargement du mesh + NEXT("dir") + std::string dir; + pFD >> dir; NEXT("mesh") pFD >> buffer; ! std::string meshname = "data/models/"; ! meshname += dir; meshname += buffer; *************** *** 47,57 **** return false; } ! for (int i=0; i<numAnims; i++) { NEXT("anim") pFD >> buffer; ! pMD5Mesh->LoadAnim ((char*)buffer.data()); } return true; } --- 50,63 ---- return false; } ! std::string animname = "data/models/"; ! animname += dir; for (int i=0; i<numAnims; i++) { NEXT("anim") pFD >> buffer; ! pMD5Mesh->LoadAnim ((char*)(animname+buffer).data()); } + if (numAnims > 0) + pMD5->iCurrentAnimation = 0; return true; } |
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6203 Modified Files: glrenderer.cc md2mesh.cc md5instance.cc md5instance.h md5mesh10.cc md5mesh10.h scenenode.cc texture.cc util.cc util.h Log Message: deverminage, calcul de bbox pour les modeles Index: util.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/util.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** util.h 26 Sep 2004 13:15:17 -0000 1.1.1.1 --- util.h 30 Sep 2004 09:23:16 -0000 1.2 *************** *** 30,33 **** --- 30,35 ---- static void QuaternionToMatrix33 (const Quaternion& q, float[9]); static void QuaternionToMatrix44 (const Quaternion& q, float[16]); + static void ChangeCoords(Vector3& v); + static void ChangeCoords(float& x, float&y, float& z); }; Index: md2mesh.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/md2mesh.cc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** md2mesh.cc 26 Sep 2004 13:15:12 -0000 1.1.1.1 --- md2mesh.cc 30 Sep 2004 09:23:16 -0000 1.2 *************** *** 5,10 **** namespace tg { - namespace scene - { /* MD2Mesh::MD2Mesh( ) : Mesh () --- 5,8 ---- *************** *** 304,307 **** }*/ - } //END scene } //END tg --- 302,304 ---- Index: md5instance.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/md5instance.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** md5instance.cc 28 Sep 2004 18:03:12 -0000 1.4 --- md5instance.cc 30 Sep 2004 09:23:16 -0000 1.5 *************** *** 12,15 **** --- 12,16 ---- pData = d; + pBBox = new BoundingBox (); iNumJoints = pData->GetNumJoints(); iNumBaseJoints = pData->GetNumBaseJoints(); *************** *** 76,81 **** --- 77,121 ---- _SkinMesh(); + _CalculateBBox (); + } + + MD5Instance::~MD5Instance () + { + delete pBBox; + } + + void MD5Instance::_CalculateBBox() + { + Vector3 vMin(0,0,0); + Vector3 vMax(0,0,0); + for (int i=0; i<pData->GetNumMeshes(); i++) + { + for (int j=0; j<pData->mesh_GetNumVerts(i); j++) + { + Vector3& vert = pVerticesListTab[i][j].vPosition; + if (vert.x > vMax.x) + vMax.x = vert.x; + if (vert.x < vMin.x) + vMin.x = vert.x; + + if (vert.y > vMax.y) + vMax.y = vert.y; + if (vert.y < vMin.y) + vMin.y = vert.y; + + if (vert.z > vMax.z) + vMax.z = vert.z; + if (vert.z < vMin.z) + vMin.z = vert.z; + + } + } + pBBox->vMin = vMin; + pBBox->vMax = vMax; + pBBox->Move (vPosition); } + + void MD5Instance::PreRender(float fTime) { Index: md5mesh10.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/md5mesh10.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** md5mesh10.h 28 Sep 2004 18:03:12 -0000 1.2 --- md5mesh10.h 30 Sep 2004 09:23:16 -0000 1.3 *************** *** 29,33 **** bool LoadMesh(char* str); bool LoadAnim(char* str); ! //Joint informations inline int GetNumJoints() { return iNumJoints; } --- 29,33 ---- bool LoadMesh(char* str); bool LoadAnim(char* str); ! //Joint informations inline int GetNumJoints() { return iNumJoints; } *************** *** 73,76 **** --- 73,77 ---- protected: + int iNumJoints; int iNumBaseJoints; *************** *** 78,81 **** --- 79,83 ---- int** pIndexes; + _MD5Joint* pJoints; Index: md5instance.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/md5instance.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** md5instance.h 27 Sep 2004 13:23:18 -0000 1.3 --- md5instance.h 30 Sep 2004 09:23:16 -0000 1.4 *************** *** 24,27 **** --- 24,28 ---- MD5Instance(MD5Mesh10*); + ~MD5Instance (); void SetAnimation (std::string name); *************** *** 50,53 **** --- 51,55 ---- void _BuildBone (int, Joint*,const Quaternion&, const Vector3&); void _SkinMesh (); + void _CalculateBBox (); MD5Mesh10* pData; Index: scenenode.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/scenenode.cc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** scenenode.cc 26 Sep 2004 13:15:15 -0000 1.1.1.1 --- scenenode.cc 30 Sep 2004 09:23:16 -0000 1.2 *************** *** 44,52 **** { vPosition = v; } void SceneNode::CalculateBoundingVolume () { ! pBBox->Move(vPosition); } --- 44,53 ---- { vPosition = v; + pBBox->Move (v); } void SceneNode::CalculateBoundingVolume () { ! //pBBox->Move(vPosition); } Index: glrenderer.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/glrenderer.cc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** glrenderer.cc 27 Sep 2004 21:34:05 -0000 1.5 --- glrenderer.cc 30 Sep 2004 09:23:16 -0000 1.6 *************** *** 1840,1844 **** --- 1840,1846 ---- glBegin (GL_POINTS); for (int i=0; i<8; i++) + { glVertex3fv(&(b->pVertices[i].x)); + } glEnd(); Index: util.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/util.cc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** util.cc 26 Sep 2004 13:15:17 -0000 1.1.1.1 --- util.cc 30 Sep 2004 09:23:16 -0000 1.2 *************** *** 10,13 **** --- 10,28 ---- } + void Util::ChangeCoords (Vector3& v) + { + float temp = v.y; + v.y = v.z; + v.z = -temp; + } + + void Util::ChangeCoords (float& x, float& y, float& z) + { + float temp = y; + y = z; + z = -temp; + } + + float Util::InvSqrt(float x) { Index: md5mesh10.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/md5mesh10.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** md5mesh10.cc 27 Sep 2004 14:45:59 -0000 1.2 --- md5mesh10.cc 30 Sep 2004 09:23:16 -0000 1.3 *************** *** 85,89 **** NEXT("(") pFD >> pJoints[i].vPosition.x >> pJoints[i].vPosition.y >> pJoints[i].vPosition.z; ! //ChangeCoords(pJoints[i].vPosition); --- 85,90 ---- NEXT("(") pFD >> pJoints[i].vPosition.x >> pJoints[i].vPosition.y >> pJoints[i].vPosition.z; ! ! Util::ChangeCoords(pJoints[i].vPosition); //ChangeCoords(pJoints[i].vPosition); *************** *** 91,94 **** --- 92,96 ---- NEXT("(") pFD >> q.x >> q.y >> q.z; + Util::ChangeCoords(q.x, q.y, q.z); q.ComputeR(); *************** *** 151,154 **** --- 153,157 ---- NEXT("(") pFD >> w.vWeights.x >> w.vWeights.y >> w.vWeights.z; + Util::ChangeCoords(w.vWeights); } } Index: texture.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/texture.cc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** texture.cc 28 Sep 2004 09:44:26 -0000 1.5 --- texture.cc 30 Sep 2004 09:23:16 -0000 1.6 *************** *** 13,18 **** namespace tg { - namespace gfx - { Texture::Texture() --- 13,16 ---- *************** *** 497,500 **** } - } //END gfx } //END tg --- 495,497 ---- |
|
From: julien r. <jul...@us...> - 2004-09-28 18:03:21
|
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4663 Modified Files: md5instance.cc md5mesh10.h scenemanager.h vshader.h Log Message: GetCamera() Index: md5mesh10.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/md5mesh10.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** md5mesh10.h 26 Sep 2004 13:15:24 -0000 1.1.1.1 --- md5mesh10.h 28 Sep 2004 18:03:12 -0000 1.2 *************** *** 61,64 **** --- 61,71 ---- inline int anim_joint_GetParent (int i, int j) { return pAnimations[i].pJointInfos[j].iParent; } inline int anim_joint_GetFlags (int i, int j) { return pAnimations[i].pJointInfos[j].iFlags; } + /*inline bool anim_joint_IsX (int i, int j) { return pAnimations[i].pJointInfos[i].iFlags.X; } + inline bool anim_joint_IsY (int i, int j) { return pAnimations[i].pJointInfos[i].iFlags.Y; } + inline bool anim_joint_IsZ (int i, int j) { return pAnimations[i].pJointInfos[i].iFlags.Z; } + inline bool anim_joint_IsQX (int i, int j) { return pAnimations[i].pJointInfos[i].iFlags.QX; } + inline bool anim_joint_IsQY (int i, int j) { return pAnimations[i].pJointInfos[i].iFlags.QY; } + inline bool anim_joint_IsQZ (int i, int j) { return pAnimations[i].pJointInfos[i].iFlags.QZ; }*/ + inline int anim_joint_GetStartIndex (int i, int j) { return pAnimations[i].pJointInfos[j].iStartIndex; } *************** *** 79,82 **** --- 86,105 ---- std::vector<_MD5Anim> pAnimations; + /*struct _MD5Attribute + { + union + { + struct + { + int X:1; + int Y:1; + int Z:1; + int QX:1; + int QY:1; + int QZ:1; + }; + int flag; + }; + };*/ struct _MD5Anim *************** *** 92,100 **** { int iParent; ! int iFlags; //les flags indiquant quelles composantes du bone sont animees int iStartIndex; }; _MD5JointInfos* pJointInfos; //un tableau de iNumJoints }; struct _MD5Joint --- 115,126 ---- { int iParent; ! //_MD5Attribute iFlags; //les flags indiquant quelles composantes du bone sont animees ! int iFlags; int iStartIndex; }; _MD5JointInfos* pJointInfos; //un tableau de iNumJoints }; + + struct _MD5Joint Index: scenemanager.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/scenemanager.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** scenemanager.h 26 Sep 2004 13:15:15 -0000 1.1.1.1 --- scenemanager.h 28 Sep 2004 18:03:12 -0000 1.2 *************** *** 40,43 **** --- 40,44 ---- void SetCamera (Camera* pcam); + Camera* GetCamera() { return pCamera; } void AddParticlesEmitter (ParticleEmitter* p, std::string name); void RemoveParticlesEmitter (std::string name); Index: vshader.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/vshader.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** vshader.h 28 Sep 2004 09:44:26 -0000 1.4 --- vshader.h 28 Sep 2004 18:03:12 -0000 1.5 *************** *** 25,27 **** } ! #endif \ No newline at end of file --- 25,28 ---- } ! #endif ! Index: md5instance.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/md5instance.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** md5instance.cc 27 Sep 2004 14:45:59 -0000 1.3 --- md5instance.cc 28 Sep 2004 18:03:12 -0000 1.4 *************** *** 87,90 **** --- 87,91 ---- fPreviousTime = fCurrentTime; iFrame++; + //std::cout << "frame " << iFrame << std::endl; if (iFrame >= pData->anim_GetNumFrames(iCurrentAnimation)) iFrame = 0; *************** *** 153,169 **** - /* next variables are unused int flags = pData->anim_joint_GetFlags(iCurrentAnimation, pJoint->iNumber); int n=0; int sIndex = pData->anim_joint_GetStartIndex(iCurrentAnimation, pJoint->iNumber); ! bool bR=false; //doit-on recalculer 'r' du quaternion ? ! */ //glPushMatrix (); // std::cout << "flags : " << std::endl; ! #if 0 if (flags & 1) //Tx est anime { ! //std::cout << "Tx" << std::endl; animatedPosition.x = pData->anim_GetFrameElement(iCurrentAnimation, iFrame, sIndex+n); n++; --- 154,168 ---- int flags = pData->anim_joint_GetFlags(iCurrentAnimation, pJoint->iNumber); int n=0; int sIndex = pData->anim_joint_GetStartIndex(iCurrentAnimation, pJoint->iNumber); ! //glPushMatrix (); // std::cout << "flags : " << std::endl; ! //std::cout << "joint : " << pJoint->iNumber << std::endl; if (flags & 1) //Tx est anime { ! // std::cout << "Tx"; animatedPosition.x = pData->anim_GetFrameElement(iCurrentAnimation, iFrame, sIndex+n); n++; *************** *** 171,175 **** if (flags & 2) //Ty est anime { ! //std::cout << "Ty" << std::endl; animatedPosition.y = pData->anim_GetFrameElement(iCurrentAnimation, iFrame, sIndex+n); n++; --- 170,174 ---- if (flags & 2) //Ty est anime { ! // std::cout << " Ty"; animatedPosition.y = pData->anim_GetFrameElement(iCurrentAnimation, iFrame, sIndex+n); n++; *************** *** 177,181 **** if (flags & 4) //Tz est anime { ! //std::cout << "Tz" << std::endl; animatedPosition.z = pData->anim_GetFrameElement(iCurrentAnimation, iFrame, sIndex+n); n++; --- 176,180 ---- if (flags & 4) //Tz est anime { ! // std::cout << " Tz"; animatedPosition.z = pData->anim_GetFrameElement(iCurrentAnimation, iFrame, sIndex+n); n++; *************** *** 183,206 **** if (flags & 8) //Qx est anime { ! //std::cout << "Qx" << std::endl; animatedOrientation.x = pData->anim_GetFrameElement(iCurrentAnimation, iFrame, sIndex+n); n++; - bR = true; } if (flags & 16) //Qy est anime { ! //std::cout << "Qy" << std::endl; animatedOrientation.y = pData->anim_GetFrameElement(iCurrentAnimation, iFrame, sIndex+n); n++; - bR = true; } if (flags & 32) //Qz est anime { ! //std::cout << "Qz" << std::endl; animatedOrientation.z = pData->anim_GetFrameElement(iCurrentAnimation, iFrame, sIndex+n); n++; - bR = true; } ! #endif animatedOrientation.ComputeR(); if (pJoint->iParent < 0) //pas de parent --- 182,203 ---- if (flags & 8) //Qx est anime { ! // std::cout << " Qx"; animatedOrientation.x = pData->anim_GetFrameElement(iCurrentAnimation, iFrame, sIndex+n); n++; } if (flags & 16) //Qy est anime { ! // std::cout << " Qy"; animatedOrientation.y = pData->anim_GetFrameElement(iCurrentAnimation, iFrame, sIndex+n); n++; } if (flags & 32) //Qz est anime { ! // std::cout << " Qz"; animatedOrientation.z = pData->anim_GetFrameElement(iCurrentAnimation, iFrame, sIndex+n); n++; } ! //std::cout << std::endl; ! animatedOrientation.ComputeR(); if (pJoint->iParent < 0) //pas de parent *************** *** 215,219 **** pJoint->qOrientation = animatedOrientation*q; } ! for (int i = 0; i < pJoint->iNumChildrens; i++) { --- 212,217 ---- pJoint->qOrientation = animatedOrientation*q; } ! ! //std::cout << pJoint->vPosition << std::endl; for (int i = 0; i < pJoint->iNumChildrens; i++) { |
|
From: julien r. <jul...@us...> - 2004-09-28 09:45:38
|
Update of /cvsroot/epfl/tggame In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27317 Modified Files: model.h pawn.h Log Message: Portage Win32 Index: model.h =================================================================== RCS file: /cvsroot/epfl/tggame/model.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** model.h 26 Sep 2004 14:44:55 -0000 1.2 --- model.h 28 Sep 2004 09:45:24 -0000 1.3 *************** *** 1,63 **** ! #ifndef _TGMODEL_H ! #define _TGMODEL_H ! ! #include <md5instance.h> ! #include <md5mesh10.h> ! #include <scenemanager.h> ! #include "gamedefs.h" ! ! using namespace tg; ! ! enum eAnimations ! { ! MDL_ANIM_WALK, ! MDL_ANIM_JUMP ! }; ! ! //Les différents type de modle. La valeur du define est égale au nombre d'animation que doit avoir le modele en question ! enum eModelType ! { ! MDL_PLAYER=0 ! }; ! ! class Model ! { ! public: ! /** ! * Constructeur ! * @param char* le nom du fichier .mdl decrivant le modele en question ! * @param eModelType le type de modele qu'on veut charger. Utile pour parser le fichier .mdl ! */ ! Model (char*, eModelType); ! ! /** ! * SetAnimation ! * @param eAnimations l'animation qu'on désire ! */ ! void SetAnimation (eAnimations); ! ! /** ! * Add : Ajoute le modele au scenemanager ! * @param SceneManager un pointeur sur le scenemanager en question ! */ ! void Add (SceneManager*); ! /** ! * Add : Ajoute le modele au moteur physique ! * @param PhysicEngine un pointeur sur le moteur physique en question ! */ ! void Add(PhysicEngine* p); ! ! ! inline void SetPosition (const Vector3& v) { pMD5->SetPosition(v); } ! inline void SetAcceleration (const Vector3& v) { pMD5->vAccel = v; } ! inline Vector3 GetAcceleration () { return pMD5->vAccel; } ! protected: ! bool _ParseMDLFile (char*); ! eModelType eType; ! ! MD5Instance* pMD5; ! MD5Mesh10* pMD5Mesh; ! ! }; ! ! #endif --- 1,63 ---- ! #ifndef _TGMODEL_H ! #define _TGMODEL_H ! ! #include <md5instance.h> ! #include <md5mesh10.h> ! #include <scenemanager.h> ! #include "gamedefs.h" ! ! using namespace tg; ! ! enum eAnimations ! { ! MDL_ANIM_WALK, ! MDL_ANIM_JUMP ! }; ! ! //Les différents type de modle. La valeur du define est égale au nombre d'animation que doit avoir le modele en question ! enum eModelType ! { ! MDL_PLAYER=0 ! }; ! ! class Model ! { ! public: ! /** ! * Constructeur ! * @param char* le nom du fichier .mdl decrivant le modele en question ! * @param eModelType le type de modele qu'on veut charger. Utile pour parser le fichier .mdl ! */ ! Model (char*, eModelType); ! ! /** ! * SetAnimation ! * @param eAnimations l'animation qu'on désire ! */ ! void SetAnimation (eAnimations); ! ! /** ! * Add : Ajoute le modele au scenemanager ! * @param SceneManager un pointeur sur le scenemanager en question ! */ ! void Add (SceneManager*); ! /** ! * Add : Ajoute le modele au moteur physique ! * @param PhysicEngine un pointeur sur le moteur physique en question ! */ ! void Add(PhysicEngine* p); ! ! ! inline void SetPosition (const Vector3& v) { pMD5->SetPosition(v); } ! inline void SetAcceleration (const Vector3& v) { pMD5->vAccel = v; } ! inline Vector3 GetAcceleration () { return pMD5->vAccel; } ! protected: ! bool _ParseMDLFile (char*); ! eModelType eType; ! ! MD5Instance* pMD5; ! MD5Mesh10* pMD5Mesh; ! ! }; ! ! #endif Index: pawn.h =================================================================== RCS file: /cvsroot/epfl/tggame/pawn.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pawn.h 26 Sep 2004 14:44:55 -0000 1.2 --- pawn.h 28 Sep 2004 09:45:24 -0000 1.3 *************** *** 1,43 **** ! #ifndef _TGPAWN_H ! #define _TGPAWN_H ! ! #include <vector3.h> ! #include <camera.h> ! ! #include "model.h" ! #include "actor.h" ! ! using namespace tg; ! ! /** ! * Pawn : classe représentant "physiquement" (modèle) un joueur. Controllée par un Controller ! */ ! class Pawn : public Actor ! { ! public: ! /** ! * Constructeur ! * @param Camera* un pointeur sur l'éventuelle caméra attachée à ce pawn ! */ ! Pawn (Camera* c=NULL); ! /** ! * Think : méthode appelée à toute les frames (avant le rendu) ! * @param float le temps écoulé depuis la dernière frame ! */ ! void Think (float eTime) {} ! ! inline void SetPosition (const Vector3& v) { pModel->SetPosition(v); if (pCamera) pCamera->SetPosition(v);} ! ! inline Camera* GetCamera () { return pCamera; } ! ! inline float GetMoveSpeed () { return fMoveSpeed; } ! ! Model* GetModel () { return pModel; } ! protected: ! float fMoveSpeed; ! ! Model* pModel; ! Camera* pCamera; ! }; ! ! #endif --- 1,43 ---- ! #ifndef _TGPAWN_H ! #define _TGPAWN_H ! ! #include <vector3.h> ! #include <camera.h> ! ! #include "model.h" ! #include "actor.h" ! ! using namespace tg; ! ! /** ! * Pawn : classe représentant "physiquement" (modèle) un joueur. Controllée par un Controller ! */ ! class Pawn : public Actor ! { ! public: ! /** ! * Constructeur ! * @param Camera* un pointeur sur l'éventuelle caméra attachée à ce pawn ! */ ! Pawn (Camera* c=NULL); ! /** ! * Think : méthode appelée à toute les frames (avant le rendu) ! * @param float le temps écoulé depuis la dernière frame ! */ ! void Think (float eTime) {} ! ! inline void SetPosition (const Vector3& v) { pModel->SetPosition(v); if (pCamera) pCamera->SetPosition(v);} ! ! inline Camera* GetCamera () { return pCamera; } ! ! inline float GetMoveSpeed () { return fMoveSpeed; } ! ! Model* GetModel () { return pModel; } ! protected: ! float fMoveSpeed; ! ! Model* pModel; ! Camera* pCamera; ! }; ! ! #endif |
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27124 Modified Files: defs.h engine.h event.h gldefs.h glrenderer.h texture.cc tgendian.h tgglext.cc tgglext.h timer.h vshader.h Log Message: Portage Win32 Index: timer.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/timer.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** timer.h 26 Sep 2004 13:15:17 -0000 1.1.1.1 --- timer.h 28 Sep 2004 09:44:26 -0000 1.2 *************** *** 3,7 **** #include "base.h" ! #include <SDL.h> namespace tg --- 3,7 ---- #include "base.h" ! #include "gldefs.h" namespace tg Index: tgglext.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/tgglext.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tgglext.cc 27 Sep 2004 19:33:58 -0000 1.2 --- tgglext.cc 28 Sep 2004 09:44:26 -0000 1.3 *************** *** 1,74 **** ! #include "tgglext.h" ! namespace tg ! { ! ! PFNGLACTIVETEXTUREPROC _glActiveTextureARB; ! PFNGLMULTITEXCOORD3FARBPROC _glMultiTexCoord3fARB; ! PFNGLMULTITEXCOORD2FARBPROC _glMultiTexCoord2fARB; ! PFNGLMULTITEXCOORD2FVARBPROC _glMultiTexCoord2fvARB; ! PFNGLMULTITEXCOORD1FARBPROC _glMultiTexCoord1fARB; ! PFNGLCLIENTACTIVETEXTUREPROC _glClientActiveTextureARB; ! ! PFNGLBINDBUFFERARBPROC _glBindBufferARB ; ! PFNGLDELETEBUFFERSARBPROC _glDeleteBuffersARB; ! PFNGLGENBUFFERSARBPROC _glGenBuffersARB; ! PFNGLBUFFERDATAARBPROC _glBufferDataARB; ! ! PFNGLGENPROGRAMSARBPROC _glGenProgramsARB; ! PFNGLBINDPROGRAMARBPROC _glBindProgramARB; ! PFNGLPROGRAMSTRINGARBPROC _glProgramStringARB; ! PFNGLPROGRAMENVPARAMETER4FARBPROC _glProgramEnvParameter4fARB; ! ! PFNGLCOMBINERPARAMETERINVPROC _glCombinerParameteriNV; ! PFNGLCOMBINERPARAMETERFVNVPROC _glCombinerParameterfvNV; ! PFNGLCOMBINERINPUTNVPROC _glCombinerInputNV; ! PFNGLCOMBINEROUTPUTNVPROC _glCombinerOutputNV; ! PFNGLFINALCOMBINERINPUTNVPROC _glFinalCombinerInputNV; ! ! PFNGLLOADPROGRAMNVPROC _glLoadProgramNV; ! PFNGLGENPROGRAMSNVPROC _glGenProgramsNV; ! PFNGLBINDPROGRAMNVPROC _glBindProgramNV; ! PFNGLTRACKMATRIXNVPROC _glTrackMatrixNV; ! PFNGLPROGRAMPARAMETER4FNVPROC _glProgramParameter4fNV; ! ! ! #ifdef TGWIN32 ! #define GETARBPOINTER(var,type,name) var = (type)wglGetProcAddress(name); ! #endif ! #ifdef TGLINUX ! #define GETARBPOINTER(var,type,name) var = (type)SDL_GL_GetProcAddress(name); ! #endif ! #ifdef TGOSX ! #define GETARBPOINTER(var,type,name) var = (type)SDL_GL_GetProcAddress(name); ! #endif ! ! ! void InitARBFunctions() ! { ! GETARBPOINTER(_glActiveTextureARB, PFNGLACTIVETEXTUREPROC, "glActiveTextureARB"); ! GETARBPOINTER(_glMultiTexCoord2fARB, PFNGLMULTITEXCOORD2FARBPROC, "glMultiTexCoord2fARB"); ! GETARBPOINTER(_glMultiTexCoord2fvARB, PFNGLMULTITEXCOORD2FVARBPROC, "glMultiTexCoord2fvARB"); ! GETARBPOINTER(_glMultiTexCoord1fARB, PFNGLMULTITEXCOORD1FARBPROC, "glMultiTexCoord1fARB"); ! GETARBPOINTER(_glMultiTexCoord3fARB, PFNGLMULTITEXCOORD3FARBPROC, "glMultiTexCoord3fARB"); ! GETARBPOINTER(_glClientActiveTextureARB, PFNGLCLIENTACTIVETEXTUREPROC, "glClientActiveTextureARB"); ! GETARBPOINTER(_glGenProgramsARB, PFNGLGENPROGRAMSARBPROC, "glGenProgramsARB"); ! GETARBPOINTER(_glBindProgramARB, PFNGLBINDPROGRAMARBPROC, "glBindProgramARB"); ! GETARBPOINTER(_glProgramStringARB, PFNGLPROGRAMSTRINGARBPROC, "glProgramStringARB"); ! GETARBPOINTER(_glProgramEnvParameter4fARB, PFNGLPROGRAMENVPARAMETER4FARBPROC, "glProgramEnvParameter4fARB"); ! GETARBPOINTER(_glBindBufferARB, PFNGLBINDBUFFERARBPROC, "glBindBufferARB"); ! GETARBPOINTER(_glDeleteBuffersARB, PFNGLDELETEBUFFERSARBPROC, "glDeleteBuffersARB"); ! GETARBPOINTER(_glGenBuffersARB, PFNGLGENBUFFERSARBPROC, "glGenBuffersARB"); ! GETARBPOINTER(_glBufferDataARB, PFNGLBUFFERDATAARBPROC, "glBufferDataARB"); ! GETARBPOINTER(_glCombinerParameteriNV, PFNGLCOMBINERPARAMETERINVPROC, "glCombinerParameteriNV"); ! GETARBPOINTER(_glCombinerParameterfvNV, PFNGLCOMBINERPARAMETERFVNVPROC, "glCombinerParameterfvNV"); ! GETARBPOINTER(_glCombinerInputNV, PFNGLCOMBINERINPUTNVPROC, "glCombinerInputNV"); ! GETARBPOINTER(_glCombinerOutputNV, PFNGLCOMBINEROUTPUTNVPROC, "glCombinerOutputNV"); ! GETARBPOINTER(_glFinalCombinerInputNV, PFNGLFINALCOMBINERINPUTNVPROC, "glFinalCombinerInputNV"); ! GETARBPOINTER(_glLoadProgramNV, PFNGLLOADPROGRAMNVPROC, "glLoadProgramNV"); ! GETARBPOINTER(_glGenProgramsNV, PFNGLGENPROGRAMSNVPROC, "glGenProgramsNV"); ! GETARBPOINTER(_glBindProgramNV, PFNGLBINDPROGRAMNVPROC, "glBindProgramNV"); ! GETARBPOINTER(_glTrackMatrixNV, PFNGLTRACKMATRIXNVPROC, "glTrackMatrixNV"); ! GETARBPOINTER(_glProgramParameter4fNV, PFNGLPROGRAMPARAMETER4FNVPROC, "glProgramParameter4fNV"); ! ! } ! } --- 1,74 ---- ! #include "tgglext.h" ! namespace tg ! { ! ! PFNGLACTIVETEXTUREPROC _glActiveTextureARB; ! PFNGLMULTITEXCOORD3FARBPROC _glMultiTexCoord3fARB; ! PFNGLMULTITEXCOORD2FARBPROC _glMultiTexCoord2fARB; ! PFNGLMULTITEXCOORD2FVARBPROC _glMultiTexCoord2fvARB; ! PFNGLMULTITEXCOORD1FARBPROC _glMultiTexCoord1fARB; ! PFNGLCLIENTACTIVETEXTUREPROC _glClientActiveTextureARB; ! ! PFNGLBINDBUFFERARBPROC _glBindBufferARB ; ! PFNGLDELETEBUFFERSARBPROC _glDeleteBuffersARB; ! PFNGLGENBUFFERSARBPROC _glGenBuffersARB; ! PFNGLBUFFERDATAARBPROC _glBufferDataARB; ! ! PFNGLGENPROGRAMSARBPROC _glGenProgramsARB; ! PFNGLBINDPROGRAMARBPROC _glBindProgramARB; ! PFNGLPROGRAMSTRINGARBPROC _glProgramStringARB; ! PFNGLPROGRAMENVPARAMETER4FARBPROC _glProgramEnvParameter4fARB; ! ! PFNGLCOMBINERPARAMETERINVPROC _glCombinerParameteriNV; ! PFNGLCOMBINERPARAMETERFVNVPROC _glCombinerParameterfvNV; ! PFNGLCOMBINERINPUTNVPROC _glCombinerInputNV; ! PFNGLCOMBINEROUTPUTNVPROC _glCombinerOutputNV; ! PFNGLFINALCOMBINERINPUTNVPROC _glFinalCombinerInputNV; ! ! PFNGLLOADPROGRAMNVPROC _glLoadProgramNV; ! PFNGLGENPROGRAMSNVPROC _glGenProgramsNV; ! PFNGLBINDPROGRAMNVPROC _glBindProgramNV; ! PFNGLTRACKMATRIXNVPROC _glTrackMatrixNV; ! PFNGLPROGRAMPARAMETER4FNVPROC _glProgramParameter4fNV; ! ! ! #ifdef TGWIN32 ! #define GETARBPOINTER(var,type,name) var = (type)wglGetProcAddress(name); ! #endif ! #ifdef TGLINUX ! #define GETARBPOINTER(var,type,name) var = (type)SDL_GL_GetProcAddress(name); ! #endif ! #ifdef TGOSX ! #define GETARBPOINTER(var,type,name) var = (type)SDL_GL_GetProcAddress(name); ! #endif ! ! ! void InitARBFunctions() ! { ! GETARBPOINTER(_glActiveTextureARB, PFNGLACTIVETEXTUREPROC, "glActiveTextureARB"); ! GETARBPOINTER(_glMultiTexCoord2fARB, PFNGLMULTITEXCOORD2FARBPROC, "glMultiTexCoord2fARB"); ! GETARBPOINTER(_glMultiTexCoord2fvARB, PFNGLMULTITEXCOORD2FVARBPROC, "glMultiTexCoord2fvARB"); ! GETARBPOINTER(_glMultiTexCoord1fARB, PFNGLMULTITEXCOORD1FARBPROC, "glMultiTexCoord1fARB"); ! GETARBPOINTER(_glMultiTexCoord3fARB, PFNGLMULTITEXCOORD3FARBPROC, "glMultiTexCoord3fARB"); ! GETARBPOINTER(_glClientActiveTextureARB, PFNGLCLIENTACTIVETEXTUREPROC, "glClientActiveTextureARB"); ! GETARBPOINTER(_glGenProgramsARB, PFNGLGENPROGRAMSARBPROC, "glGenProgramsARB"); ! GETARBPOINTER(_glBindProgramARB, PFNGLBINDPROGRAMARBPROC, "glBindProgramARB"); ! GETARBPOINTER(_glProgramStringARB, PFNGLPROGRAMSTRINGARBPROC, "glProgramStringARB"); ! GETARBPOINTER(_glProgramEnvParameter4fARB, PFNGLPROGRAMENVPARAMETER4FARBPROC, "glProgramEnvParameter4fARB"); ! GETARBPOINTER(_glBindBufferARB, PFNGLBINDBUFFERARBPROC, "glBindBufferARB"); ! GETARBPOINTER(_glDeleteBuffersARB, PFNGLDELETEBUFFERSARBPROC, "glDeleteBuffersARB"); ! GETARBPOINTER(_glGenBuffersARB, PFNGLGENBUFFERSARBPROC, "glGenBuffersARB"); ! GETARBPOINTER(_glBufferDataARB, PFNGLBUFFERDATAARBPROC, "glBufferDataARB"); ! GETARBPOINTER(_glCombinerParameteriNV, PFNGLCOMBINERPARAMETERINVPROC, "glCombinerParameteriNV"); ! GETARBPOINTER(_glCombinerParameterfvNV, PFNGLCOMBINERPARAMETERFVNVPROC, "glCombinerParameterfvNV"); ! GETARBPOINTER(_glCombinerInputNV, PFNGLCOMBINERINPUTNVPROC, "glCombinerInputNV"); ! GETARBPOINTER(_glCombinerOutputNV, PFNGLCOMBINEROUTPUTNVPROC, "glCombinerOutputNV"); ! GETARBPOINTER(_glFinalCombinerInputNV, PFNGLFINALCOMBINERINPUTNVPROC, "glFinalCombinerInputNV"); ! GETARBPOINTER(_glLoadProgramNV, PFNGLLOADPROGRAMNVPROC, "glLoadProgramNV"); ! GETARBPOINTER(_glGenProgramsNV, PFNGLGENPROGRAMSNVPROC, "glGenProgramsNV"); ! GETARBPOINTER(_glBindProgramNV, PFNGLBINDPROGRAMNVPROC, "glBindProgramNV"); ! GETARBPOINTER(_glTrackMatrixNV, PFNGLTRACKMATRIXNVPROC, "glTrackMatrixNV"); ! GETARBPOINTER(_glProgramParameter4fNV, PFNGLPROGRAMPARAMETER4FNVPROC, "glProgramParameter4fNV"); ! ! } ! } Index: defs.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/defs.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** defs.h 27 Sep 2004 21:34:05 -0000 1.2 --- defs.h 28 Sep 2004 09:44:26 -0000 1.3 *************** *** 12,15 **** --- 12,23 ---- #include <sstream> + #ifdef TGWIN32 + #include <SDL/SDL.h> + #include <SDL/SDL_image.h> + #else + #include <SDL.h> + #include <SDL_image.h> + #endif + namespace tg { Index: tgglext.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/tgglext.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tgglext.h 27 Sep 2004 19:33:58 -0000 1.2 --- tgglext.h 28 Sep 2004 09:44:26 -0000 1.3 *************** *** 1,82 **** ! #ifndef _TGTGGLEXT_H ! #define _TGTGGLEXT_H ! ! #include "gldefs.h" ! //#define GL_GLEXT_PROTOTYPES ! //#undef GL_GLEXT_PROTOTYPES ! ! #ifndef APIENTRY ! #define APIENTRY ! #endif ! ! namespace tg ! { ! ! typedef void (APIENTRY * PFNGLACTIVETEXTUREPROC) (GLenum texture); ! typedef void (APIENTRY * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); ! ! typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); ! typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); ! typedef void (APIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); ! typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); ! ! typedef void (APIENTRY * PFNGLBINDBUFFERARBPROC)(GLenum target, GLuint buffer); ! typedef void (APIENTRY * PFNGLDELETEBUFFERSARBPROC)(GLsizei n, const GLuint *buffers); ! typedef void (APIENTRY * PFNGLGENBUFFERSARBPROC)(GLsizei n, GLuint *buffers); ! typedef void (APIENTRY * PFNGLBUFFERDATAARBPROC) (GLenum target, int size, const GLvoid *data, GLenum usage); ! ! typedef void (APIENTRY * PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); ! typedef void (APIENTRY * PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); ! typedef void (APIENTRY * PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void *string); ! typedef void (APIENTRY * PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); ! ! typedef void (APIENTRY * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); ! typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); ! typedef void (APIENTRY * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); ! typedef void (APIENTRY * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); ! typedef void (APIENTRY * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); ! ! typedef void (APIENTRY * PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); ! typedef void (APIENTRY * PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); ! typedef void (APIENTRY * PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); ! typedef void (APIENTRY * PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); ! typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); ! ! extern PFNGLACTIVETEXTUREPROC _glActiveTextureARB; ! extern PFNGLMULTITEXCOORD3FARBPROC _glMultiTexCoord3fARB; ! extern PFNGLMULTITEXCOORD2FARBPROC _glMultiTexCoord2fARB; ! extern PFNGLMULTITEXCOORD2FVARBPROC _glMultiTexCoord2fvARB; ! extern PFNGLMULTITEXCOORD1FARBPROC _glMultiTexCoord1fARB; ! extern PFNGLCLIENTACTIVETEXTUREPROC _glClientActiveTextureARB; ! ! extern PFNGLBINDBUFFERARBPROC _glBindBufferARB ; ! extern PFNGLDELETEBUFFERSARBPROC _glDeleteBuffersARB; ! extern PFNGLGENBUFFERSARBPROC _glGenBuffersARB; ! extern PFNGLBUFFERDATAARBPROC _glBufferDataARB; ! ! extern PFNGLGENPROGRAMSARBPROC _glGenProgramsARB; ! extern PFNGLBINDPROGRAMARBPROC _glBindProgramARB; ! extern PFNGLPROGRAMSTRINGARBPROC _glProgramStringARB; ! extern PFNGLPROGRAMENVPARAMETER4FARBPROC _glProgramEnvParameter4fARB; ! ! extern PFNGLCOMBINERPARAMETERINVPROC _glCombinerParameteriNV; ! extern PFNGLCOMBINERPARAMETERFVNVPROC _glCombinerParameterfvNV; ! extern PFNGLCOMBINERINPUTNVPROC _glCombinerInputNV; ! extern PFNGLCOMBINEROUTPUTNVPROC _glCombinerOutputNV; ! extern PFNGLFINALCOMBINERINPUTNVPROC _glFinalCombinerInputNV; ! ! extern PFNGLLOADPROGRAMNVPROC _glLoadProgramNV; ! extern PFNGLGENPROGRAMSNVPROC _glGenProgramsNV; ! extern PFNGLBINDPROGRAMNVPROC _glBindProgramNV; ! extern PFNGLTRACKMATRIXNVPROC _glTrackMatrixNV; ! extern PFNGLPROGRAMPARAMETER4FNVPROC _glProgramParameter4fNV; ! ! #define GL_VERTEX_PROGRAM_NV 0x8620 ! #define GL_PROGRAM_ERROR_POSITION_NV 0x864B ! #define GL_IDENTITY_NV 0x862A ! #define GL_MODELVIEW_PROJECTION_NV 0x8629 ! ! void InitARBFunctions (); ! ! } ! #endif --- 1,82 ---- ! #ifndef _TGTGGLEXT_H ! #define _TGTGGLEXT_H ! ! #include "gldefs.h" ! //#define GL_GLEXT_PROTOTYPES ! //#undef GL_GLEXT_PROTOTYPES ! ! #ifndef APIENTRY ! #define APIENTRY ! #endif ! ! namespace tg ! { ! ! typedef void (APIENTRY * PFNGLACTIVETEXTUREPROC) (GLenum texture); ! typedef void (APIENTRY * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); ! ! typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); ! typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); ! typedef void (APIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); ! typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); ! ! typedef void (APIENTRY * PFNGLBINDBUFFERARBPROC)(GLenum target, GLuint buffer); ! typedef void (APIENTRY * PFNGLDELETEBUFFERSARBPROC)(GLsizei n, const GLuint *buffers); ! typedef void (APIENTRY * PFNGLGENBUFFERSARBPROC)(GLsizei n, GLuint *buffers); ! typedef void (APIENTRY * PFNGLBUFFERDATAARBPROC) (GLenum target, int size, const GLvoid *data, GLenum usage); ! ! typedef void (APIENTRY * PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); ! typedef void (APIENTRY * PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); ! typedef void (APIENTRY * PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void *string); ! typedef void (APIENTRY * PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); ! ! typedef void (APIENTRY * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); ! typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); ! typedef void (APIENTRY * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); ! typedef void (APIENTRY * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); ! typedef void (APIENTRY * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); ! ! typedef void (APIENTRY * PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); ! typedef void (APIENTRY * PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); ! typedef void (APIENTRY * PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); ! typedef void (APIENTRY * PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); ! typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); ! ! extern PFNGLACTIVETEXTUREPROC _glActiveTextureARB; ! extern PFNGLMULTITEXCOORD3FARBPROC _glMultiTexCoord3fARB; ! extern PFNGLMULTITEXCOORD2FARBPROC _glMultiTexCoord2fARB; ! extern PFNGLMULTITEXCOORD2FVARBPROC _glMultiTexCoord2fvARB; ! extern PFNGLMULTITEXCOORD1FARBPROC _glMultiTexCoord1fARB; ! extern PFNGLCLIENTACTIVETEXTUREPROC _glClientActiveTextureARB; ! ! extern PFNGLBINDBUFFERARBPROC _glBindBufferARB ; ! extern PFNGLDELETEBUFFERSARBPROC _glDeleteBuffersARB; ! extern PFNGLGENBUFFERSARBPROC _glGenBuffersARB; ! extern PFNGLBUFFERDATAARBPROC _glBufferDataARB; ! ! extern PFNGLGENPROGRAMSARBPROC _glGenProgramsARB; ! extern PFNGLBINDPROGRAMARBPROC _glBindProgramARB; ! extern PFNGLPROGRAMSTRINGARBPROC _glProgramStringARB; ! extern PFNGLPROGRAMENVPARAMETER4FARBPROC _glProgramEnvParameter4fARB; ! ! extern PFNGLCOMBINERPARAMETERINVPROC _glCombinerParameteriNV; ! extern PFNGLCOMBINERPARAMETERFVNVPROC _glCombinerParameterfvNV; ! extern PFNGLCOMBINERINPUTNVPROC _glCombinerInputNV; ! extern PFNGLCOMBINEROUTPUTNVPROC _glCombinerOutputNV; ! extern PFNGLFINALCOMBINERINPUTNVPROC _glFinalCombinerInputNV; ! ! extern PFNGLLOADPROGRAMNVPROC _glLoadProgramNV; ! extern PFNGLGENPROGRAMSNVPROC _glGenProgramsNV; ! extern PFNGLBINDPROGRAMNVPROC _glBindProgramNV; ! extern PFNGLTRACKMATRIXNVPROC _glTrackMatrixNV; ! extern PFNGLPROGRAMPARAMETER4FNVPROC _glProgramParameter4fNV; ! ! #define GL_VERTEX_PROGRAM_NV 0x8620 ! #define GL_PROGRAM_ERROR_POSITION_NV 0x864B ! #define GL_IDENTITY_NV 0x862A ! #define GL_MODELVIEW_PROJECTION_NV 0x8629 ! ! void InitARBFunctions (); ! ! } ! #endif Index: tgendian.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/tgendian.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** tgendian.h 26 Sep 2004 13:15:35 -0000 1.1.1.1 --- tgendian.h 28 Sep 2004 09:44:26 -0000 1.2 *************** *** 1,71 **** ! #ifndef _TGTGENDIAN_H ! #define _TGTGENDIAN_H ! namespace tg ! { ! ! /** ! * Endian : Gestion de la conversion little endian/big endian ! */ ! class Endian ! { ! public: ! virtual short Short (short l) = 0; ! virtual int Long (int l) = 0; ! virtual float Float (float f) = 0; ! bool bLittle; ! }; ! ! /** ! * LittleEndian : conversion pour les architectures x86. Les .bmp et .bsp sont en littleendian -> pas de conversion ! */ ! class LittleEndian : public Endian ! { ! public: ! LittleEndian () { bLittle=true; } ! short Short (short l) { return l; } ! int Long (int l) { return l; } ! float Float (float f) { return f; } ! ! }; ! ! class BigEndian : public Endian ! { ! public: ! BigEndian () { bLittle=false; } ! short Short (short l) ! { ! unsigned char b1, b2; ! b1 = l&255; ! b2 = (l>>8)&255; ! return (b1<<8) + b2; ! } ! ! int Long (int l) ! { ! unsigned char b1,b2,b3,b4; ! b1=l&255; ! b2=(l>>8)&255; ! b3=(l>>16)&255; ! b4=(l>>24)&255; ! return ((int)b1<<24) + ((int)b2<<16) + ((int)b3<<8) + b4; ! } ! ! float Float (float f) ! { ! union ! { ! float f; ! unsigned char b[4]; ! }dat1, dat2; ! dat1.f = f; ! dat2.b[0] = dat1.b[3]; ! dat2.b[1] = dat1.b[2]; ! dat2.b[2] = dat1.b[1]; ! dat2.b[3] = dat1.b[0]; ! return dat2.f; ! } ! ! }; ! ! } ! #endif --- 1,71 ---- ! #ifndef _TGTGENDIAN_H ! #define _TGTGENDIAN_H ! namespace tg ! { ! ! /** ! * Endian : Gestion de la conversion little endian/big endian ! */ ! class Endian ! { ! public: ! virtual short Short (short l) = 0; ! virtual int Long (int l) = 0; ! virtual float Float (float f) = 0; ! bool bLittle; ! }; ! ! /** ! * LittleEndian : conversion pour les architectures x86. Les .bmp et .bsp sont en littleendian -> pas de conversion ! */ ! class LittleEndian : public Endian ! { ! public: ! LittleEndian () { bLittle=true; } ! short Short (short l) { return l; } ! int Long (int l) { return l; } ! float Float (float f) { return f; } ! ! }; ! ! class BigEndian : public Endian ! { ! public: ! BigEndian () { bLittle=false; } ! short Short (short l) ! { ! unsigned char b1, b2; ! b1 = l&255; ! b2 = (l>>8)&255; ! return (b1<<8) + b2; ! } ! ! int Long (int l) ! { ! unsigned char b1,b2,b3,b4; ! b1=l&255; ! b2=(l>>8)&255; ! b3=(l>>16)&255; ! b4=(l>>24)&255; ! return ((int)b1<<24) + ((int)b2<<16) + ((int)b3<<8) + b4; ! } ! ! float Float (float f) ! { ! union ! { ! float f; ! unsigned char b[4]; ! }dat1, dat2; ! dat1.f = f; ! dat2.b[0] = dat1.b[3]; ! dat2.b[1] = dat1.b[2]; ! dat2.b[2] = dat1.b[1]; ! dat2.b[3] = dat1.b[0]; ! return dat2.f; ! } ! ! }; ! ! } ! #endif Index: vshader.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/vshader.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** vshader.h 27 Sep 2004 19:33:58 -0000 1.3 --- vshader.h 28 Sep 2004 09:44:26 -0000 1.4 *************** *** 1,27 **** ! #ifndef _TGVSHADER_H ! #define _TGVSHADER_H ! ! #include "gldefs.h" ! ! namespace tg ! { ! ! /** ! * Classe de gestion des vertex shaders ! */ ! class VShader ! { ! public: ! VShader(const char* name); ! void Enable (); ! void Disable (); ! void Bind (); ! void Bind (const float* value, ...); ! void SetParams(const float* value, ...); ! protected: ! //GLhandleARB shader; ! }; ! ! } ! #endif \ No newline at end of file --- 1,27 ---- ! #ifndef _TGVSHADER_H ! #define _TGVSHADER_H ! ! #include "gldefs.h" ! ! namespace tg ! { ! ! /** ! * Classe de gestion des vertex shaders ! */ ! class VShader ! { ! public: ! VShader(const char* name); ! void Enable (); ! void Disable (); ! void Bind (); ! void Bind (const float* value, ...); ! void SetParams(const float* value, ...); ! protected: ! //GLhandleARB shader; ! }; ! ! } ! #endif \ No newline at end of file Index: texture.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/texture.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** texture.cc 27 Sep 2004 22:10:57 -0000 1.4 --- texture.cc 28 Sep 2004 09:44:26 -0000 1.5 *************** *** 10,14 **** #endif #include "engine.h" - #include "SDL_image.h" namespace tg --- 10,13 ---- Index: engine.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/engine.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** engine.h 26 Sep 2004 13:15:07 -0000 1.1.1.1 --- engine.h 28 Sep 2004 09:44:26 -0000 1.2 *************** *** 35,39 **** #include "texturemanager.h" #include "tgendian.h" ! #include <SDL.h> namespace tg --- 35,39 ---- #include "texturemanager.h" #include "tgendian.h" ! #include "defs.h" namespace tg Index: glrenderer.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/glrenderer.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** glrenderer.h 26 Sep 2004 13:15:12 -0000 1.1.1.1 --- glrenderer.h 28 Sep 2004 09:44:26 -0000 1.2 *************** *** 7,11 **** #include "texture.h" #include "boundingbox.h" - #include <SDL.h> #include "gldefs.h" #include <vector> --- 7,10 ---- Index: event.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/event.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** event.h 26 Sep 2004 13:15:07 -0000 1.1.1.1 --- event.h 28 Sep 2004 09:44:26 -0000 1.2 *************** *** 1,448 **** ! /* ! * TG Engine ! * ! * Copyright (C) 2004 Julien "Silver" Rebetez ! * ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with this program; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! */ ! ! #ifndef _TGEVENT_H ! #define _TGEVENT_H ! ! #include "defs.h" ! #include <SDL.h> ! namespace tg ! { ! /** @defgroup eventstructs AE event structs and definitions. ! * AE event structures and definitions. ! * @{ ! */ ! ! /// Key definition table. ! /*! ! This is essentially the same as SDLKEY_*, the only ! change is in the name (AEKEY_*). ! */ ! enum tgKey { ! TGKEY_UNKNOWN = 0, ! TGKEY_FIRST = 0, ! TGKEY_BACKSPACE = 8, ! TGKEY_TAB = 9, ! TGKEY_CLEAR = 12, ! TGKEY_RETURN = 13, ! TGKEY_PAUSE = 19, ! TGKEY_ESCAPE = 27, ! TGKEY_SPACE = 32, ! TGKEY_EXCLAIM = 33, ! TGKEY_QUOTEDBL = 34, ! TGKEY_HASH = 35, ! TGKEY_DOLLAR = 36, ! TGKEY_AMPERSAND = 38, ! TGKEY_QUOTE = 39, ! TGKEY_LEFTPAREN = 40, ! TGKEY_RIGHTPAREN = 41, ! TGKEY_ASTERISK = 42, ! TGKEY_PLUS = 43, ! TGKEY_COMMA = 44, ! TGKEY_MINUS = 45, ! TGKEY_PERIOD = 46, ! TGKEY_SLASH = 47, ! TGKEY_0 = 48, ! TGKEY_1 = 49, ! TGKEY_2 = 50, ! TGKEY_3 = 51, ! TGKEY_4 = 52, ! TGKEY_5 = 53, ! TGKEY_6 = 54, ! TGKEY_7 = 55, ! TGKEY_8 = 56, ! TGKEY_9 = 57, ! TGKEY_COLON = 58, ! TGKEY_SEMICOLON = 59, ! TGKEY_LESS = 60, ! TGKEY_EQUALS = 61, ! TGKEY_GREATER = 62, ! TGKEY_QUESTION = 63, ! TGKEY_AT = 64, ! ! TGKEY_LEFTBRACKET = 91, ! TGKEY_BACKSLASH = 92, ! TGKEY_RIGHTBRACKET = 93, ! TGKEY_CARET = 94, ! TGKEY_UNDERSCORE = 95, ! TGKEY_BACKQUOTE = 96, ! TGKEY_a = 97, ! TGKEY_b = 98, ! TGKEY_c = 99, ! TGKEY_d = 100, ! TGKEY_e = 101, ! TGKEY_f = 102, ! TGKEY_g = 103, ! TGKEY_h = 104, ! TGKEY_i = 105, ! TGKEY_j = 106, ! TGKEY_k = 107, ! TGKEY_l = 108, ! TGKEY_m = 109, ! TGKEY_n = 110, ! TGKEY_o = 111, ! TGKEY_p = 112, ! TGKEY_q = 113, ! TGKEY_r = 114, ! TGKEY_s = 115, ! TGKEY_t = 116, ! TGKEY_u = 117, ! TGKEY_v = 118, ! TGKEY_w = 119, ! TGKEY_x = 120, ! TGKEY_y = 121, ! TGKEY_z = 122, ! TGKEY_DELETE = 127, ! ! TGKEY_WORLD_0 = 160, ! TGKEY_WORLD_1 = 161, ! TGKEY_WORLD_2 = 162, ! TGKEY_WORLD_3 = 163, ! TGKEY_WORLD_4 = 164, ! TGKEY_WORLD_5 = 165, ! TGKEY_WORLD_6 = 166, ! TGKEY_WORLD_7 = 167, ! TGKEY_WORLD_8 = 168, ! TGKEY_WORLD_9 = 169, ! TGKEY_WORLD_10 = 170, ! TGKEY_WORLD_11 = 171, ! TGKEY_WORLD_12 = 172, ! TGKEY_WORLD_13 = 173, ! TGKEY_WORLD_14 = 174, ! TGKEY_WORLD_15 = 175, ! TGKEY_WORLD_16 = 176, ! TGKEY_WORLD_17 = 177, ! TGKEY_WORLD_18 = 178, ! TGKEY_WORLD_19 = 179, ! TGKEY_WORLD_20 = 180, ! TGKEY_WORLD_21 = 181, ! TGKEY_WORLD_22 = 182, ! TGKEY_WORLD_23 = 183, ! TGKEY_WORLD_24 = 184, ! TGKEY_WORLD_25 = 185, ! TGKEY_WORLD_26 = 186, ! TGKEY_WORLD_27 = 187, ! TGKEY_WORLD_28 = 188, ! TGKEY_WORLD_29 = 189, ! TGKEY_WORLD_30 = 190, ! TGKEY_WORLD_31 = 191, ! TGKEY_WORLD_32 = 192, ! TGKEY_WORLD_33 = 193, ! TGKEY_WORLD_34 = 194, ! TGKEY_WORLD_35 = 195, ! TGKEY_WORLD_36 = 196, ! TGKEY_WORLD_37 = 197, ! TGKEY_WORLD_38 = 198, ! TGKEY_WORLD_39 = 199, ! TGKEY_WORLD_40 = 200, ! TGKEY_WORLD_41 = 201, ! TGKEY_WORLD_42 = 202, ! TGKEY_WORLD_43 = 203, ! TGKEY_WORLD_44 = 204, ! TGKEY_WORLD_45 = 205, ! TGKEY_WORLD_46 = 206, ! TGKEY_WORLD_47 = 207, ! TGKEY_WORLD_48 = 208, ! TGKEY_WORLD_49 = 209, ! TGKEY_WORLD_50 = 210, ! TGKEY_WORLD_51 = 211, ! TGKEY_WORLD_52 = 212, ! TGKEY_WORLD_53 = 213, ! TGKEY_WORLD_54 = 214, ! TGKEY_WORLD_55 = 215, ! TGKEY_WORLD_56 = 216, ! TGKEY_WORLD_57 = 217, ! TGKEY_WORLD_58 = 218, ! TGKEY_WORLD_59 = 219, ! TGKEY_WORLD_60 = 220, ! TGKEY_WORLD_61 = 221, ! TGKEY_WORLD_62 = 222, ! TGKEY_WORLD_63 = 223, ! TGKEY_WORLD_64 = 224, ! TGKEY_WORLD_65 = 225, ! TGKEY_WORLD_66 = 226, ! TGKEY_WORLD_67 = 227, ! TGKEY_WORLD_68 = 228, ! TGKEY_WORLD_69 = 229, ! TGKEY_WORLD_70 = 230, ! TGKEY_WORLD_71 = 231, ! TGKEY_WORLD_72 = 232, ! TGKEY_WORLD_73 = 233, ! TGKEY_WORLD_74 = 234, ! TGKEY_WORLD_75 = 235, ! TGKEY_WORLD_76 = 236, ! TGKEY_WORLD_77 = 237, ! TGKEY_WORLD_78 = 238, ! TGKEY_WORLD_79 = 239, ! TGKEY_WORLD_80 = 240, ! TGKEY_WORLD_81 = 241, ! TGKEY_WORLD_82 = 242, ! TGKEY_WORLD_83 = 243, ! TGKEY_WORLD_84 = 244, ! TGKEY_WORLD_85 = 245, ! TGKEY_WORLD_86 = 246, ! TGKEY_WORLD_87 = 247, ! TGKEY_WORLD_88 = 248, ! TGKEY_WORLD_89 = 249, ! TGKEY_WORLD_90 = 250, ! TGKEY_WORLD_91 = 251, ! TGKEY_WORLD_92 = 252, ! TGKEY_WORLD_93 = 253, ! TGKEY_WORLD_94 = 254, ! TGKEY_WORLD_95 = 255, ! ! TGKEY_KP0 = 256, ! TGKEY_KP1 = 257, ! TGKEY_KP2 = 258, ! TGKEY_KP3 = 259, ! TGKEY_KP4 = 260, ! TGKEY_KP5 = 261, ! TGKEY_KP6 = 262, ! TGKEY_KP7 = 263, ! TGKEY_KP8 = 264, ! TGKEY_KP9 = 265, ! TGKEY_KP_PERIOD = 266, ! TGKEY_KP_DIVIDE = 267, ! TGKEY_KP_MULTIPLY = 268, ! TGKEY_KP_MINUS = 269, ! TGKEY_KP_PLUS = 270, ! TGKEY_KP_ENTER = 271, ! TGKEY_KP_EQUALS = 272, ! ! TGKEY_UP = 273, ! TGKEY_DOWN = 274, ! TGKEY_RIGHT = 275, ! TGKEY_LEFT = 276, ! TGKEY_INSERT = 277, ! TGKEY_HOME = 278, ! TGKEY_END = 279, ! TGKEY_PAGEUP = 280, ! TGKEY_PAGEDOWN = 281, ! ! TGKEY_F1 = 282, ! TGKEY_F2 = 283, ! TGKEY_F3 = 284, ! TGKEY_F4 = 285, ! TGKEY_F5 = 286, ! TGKEY_F6 = 287, ! TGKEY_F7 = 288, ! TGKEY_F8 = 289, ! TGKEY_F9 = 290, ! TGKEY_F10 = 291, ! TGKEY_F11 = 292, ! TGKEY_F12 = 293, ! TGKEY_F13 = 294, ! TGKEY_F14 = 295, ! TGKEY_F15 = 296, ! ! TGKEY_NUMLOCK = 300, ! TGKEY_CAPSLOCK = 301, ! TGKEY_SCROLLOCK = 302, ! TGKEY_RSHIFT = 303, ! TGKEY_LSHIFT = 304, ! TGKEY_RCTRL = 305, ! TGKEY_LCTRL = 306, ! TGKEY_RALT = 307, ! TGKEY_LALT = 308, ! TGKEY_RMETA = 309, ! TGKEY_LMETA = 310, ! TGKEY_LSUPER = 311, ! TGKEY_RSUPER = 312, ! TGKEY_MODE = 313, ! TGKEY_COMPOSE = 314, ! ! TGKEY_HELP = 315, ! TGKEY_PRINT = 316, ! TGKEY_SYSREQ = 317, ! TGKEY_BREAK = 318, ! TGKEY_MENU = 319, ! TGKEY_POWER = 320, ! TGKEY_EURO = 321, ! TGKEY_UNDO = 322, ! ! TGKEY_LAST ! }; ! ! /// Just a rename... ! typedef SDLMod tgKeyMod; ! ! /// Event type codes. Used to indentify the type of an event occuring. ! enum tgEventType { ! evActiveEvent, ! evBroadcast, ! evKeyDown, ! evKeyUp, ! evMouseMotion, ! evMouseButtonDown, ! evMouseButtonUp, ! evQuit ! }; ! ! /// Event command codes. ! enum tgEventCmdCode { ! cmdPreFrame, ! cmdProcessFrame, ! cmdPostFrame, ! cmdToggleFullscreen ! }; ! ! /// Application focus states. ! enum tgAppActiveState { ! tgAppMouseFocus, ! tgAppInputFocus, ! tgAppActive ! }; ! ! /// Button states for press/release. ! enum tgButtonState { ! tgPressed, ! tgReleased ! }; ! ! /// Mouse button definitions. ! enum tgMouseButton { ! tgButtonLeft = 1, ! tgButtonMiddle = 2, ! tgButtonRight = 3 ! }; ! ! /// Mouse button states for press/release. ! enum tgMouseButtonState { ! tgNonePressed = 0, ! tgLeftPressed = 1, ! tgMiddlePressed = 2, ! tgRightPressed = 3 ! }; ! ! /** ! * Holds info for app focus gain/lost event. ! * ! */ ! struct tgActiveEvent { ! /// Event type. ! tgEventType type; ! /// Whether it was gain or loss. 0 = loss, 1 = gain. ! uint8 gain; ! /// App focus state. ! tgAppActiveState state; ! }; ! ! /** ! * Event command struct. ! * ! */ ! struct tgEventCommand { ! /// Event command code. ! tgEventCmdCode code; ! }; ! ! /** ! * Key press info. ! * ! */ ! struct tgKeySym { ! /// Scancode. ! uint8 scancode; ! /// The key this event occured on. ! tgKey sym; ! /// Modified key. ! tgKeyMod mod; ! /// Unicode. ! uint16 unicode; ! }; ! ! /** ! * Keyboard event struct. ! * ! */ ! struct tgKeyboardEvent { ! /// Event type. ! tgEventType type; ! /// Button state. ! tgButtonState state; ! // Key press information. ! tgKeySym keysym; ! }; ! ! /** ! * Mouse motion event struct. ! * ! */ ! struct tgMouseMotionEvent { ! /// Event type. ! tgEventType type; ! /// Mouse button state. ! tgMouseButtonState state; ! /// X and Y pos of the mouse cursor. ! uint16 x, y; ! /// The change in mouse X and Y from the last position. ! sint16 xrel, yrel; ! }; ! ! /** ! * Mouse button event struct. ! * ! */ ! struct tgMouseButtonEvent { ! /// Event type. ! tgEventType type; ! /// Mouse button this even occured on. ! tgMouseButton button; ! /// Button state. ! tgButtonState state; ! /// Mouse position. ! uint16 x, y; ! }; ! ! /** ! * Quit event. Used on application quit. ! * ! */ ! struct tgQuitEvent { ! /// Event type. ! tgEventType type; ! }; ! ! /** ! * The TG event structure. ! * ! */ ! struct tgEvent { ! /// Event type. ! tgEventType type; ! /// Event command. ! tgEventCommand cmd; ! /// Active event. ! tgActiveEvent active; ! /// Keyboard event. ! tgKeyboardEvent key; ! /// Mouse motion event. ! tgMouseMotionEvent motion; ! /// Mouse button event. ! tgMouseButtonEvent button; ! /// Quit event. ! tgQuitEvent quit; ! }; ! ! ! /** @} */ ! } ! #endif // __TGLIB_TGENGINE_EVENT_H__ --- 1,447 ---- ! /* ! * TG Engine ! * ! * Copyright (C) 2004 Julien "Silver" Rebetez ! * ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with this program; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! */ ! ! #ifndef _TGEVENT_H ! #define _TGEVENT_H ! ! #include "defs.h" ! namespace tg ! { ! /** @defgroup eventstructs AE event structs and definitions. ! * AE event structures and definitions. ! * @{ ! */ ! ! /// Key definition table. ! /*! ! This is essentially the same as SDLKEY_*, the only ! change is in the name (AEKEY_*). ! */ ! enum tgKey { ! TGKEY_UNKNOWN = 0, ! TGKEY_FIRST = 0, ! TGKEY_BACKSPACE = 8, ! TGKEY_TAB = 9, ! TGKEY_CLEAR = 12, ! TGKEY_RETURN = 13, ! TGKEY_PAUSE = 19, ! TGKEY_ESCAPE = 27, ! TGKEY_SPACE = 32, ! TGKEY_EXCLAIM = 33, ! TGKEY_QUOTEDBL = 34, ! TGKEY_HASH = 35, ! TGKEY_DOLLAR = 36, ! TGKEY_AMPERSAND = 38, ! TGKEY_QUOTE = 39, ! TGKEY_LEFTPAREN = 40, ! TGKEY_RIGHTPAREN = 41, ! TGKEY_ASTERISK = 42, ! TGKEY_PLUS = 43, ! TGKEY_COMMA = 44, ! TGKEY_MINUS = 45, ! TGKEY_PERIOD = 46, ! TGKEY_SLASH = 47, ! TGKEY_0 = 48, ! TGKEY_1 = 49, ! TGKEY_2 = 50, ! TGKEY_3 = 51, ! TGKEY_4 = 52, ! TGKEY_5 = 53, ! TGKEY_6 = 54, ! TGKEY_7 = 55, ! TGKEY_8 = 56, ! TGKEY_9 = 57, ! TGKEY_COLON = 58, ! TGKEY_SEMICOLON = 59, ! TGKEY_LESS = 60, ! TGKEY_EQUALS = 61, ! TGKEY_GREATER = 62, ! TGKEY_QUESTION = 63, ! TGKEY_AT = 64, ! ! TGKEY_LEFTBRACKET = 91, ! TGKEY_BACKSLASH = 92, ! TGKEY_RIGHTBRACKET = 93, ! TGKEY_CARET = 94, ! TGKEY_UNDERSCORE = 95, ! TGKEY_BACKQUOTE = 96, ! TGKEY_a = 97, ! TGKEY_b = 98, ! TGKEY_c = 99, ! TGKEY_d = 100, ! TGKEY_e = 101, ! TGKEY_f = 102, ! TGKEY_g = 103, ! TGKEY_h = 104, ! TGKEY_i = 105, ! TGKEY_j = 106, ! TGKEY_k = 107, ! TGKEY_l = 108, ! TGKEY_m = 109, ! TGKEY_n = 110, ! TGKEY_o = 111, ! TGKEY_p = 112, ! TGKEY_q = 113, ! TGKEY_r = 114, ! TGKEY_s = 115, ! TGKEY_t = 116, ! TGKEY_u = 117, ! TGKEY_v = 118, ! TGKEY_w = 119, ! TGKEY_x = 120, ! TGKEY_y = 121, ! TGKEY_z = 122, ! TGKEY_DELETE = 127, ! ! TGKEY_WORLD_0 = 160, ! TGKEY_WORLD_1 = 161, ! TGKEY_WORLD_2 = 162, ! TGKEY_WORLD_3 = 163, ! TGKEY_WORLD_4 = 164, ! TGKEY_WORLD_5 = 165, ! TGKEY_WORLD_6 = 166, ! TGKEY_WORLD_7 = 167, ! TGKEY_WORLD_8 = 168, ! TGKEY_WORLD_9 = 169, ! TGKEY_WORLD_10 = 170, ! TGKEY_WORLD_11 = 171, ! TGKEY_WORLD_12 = 172, ! TGKEY_WORLD_13 = 173, ! TGKEY_WORLD_14 = 174, ! TGKEY_WORLD_15 = 175, ! TGKEY_WORLD_16 = 176, ! TGKEY_WORLD_17 = 177, ! TGKEY_WORLD_18 = 178, ! TGKEY_WORLD_19 = 179, ! TGKEY_WORLD_20 = 180, ! TGKEY_WORLD_21 = 181, ! TGKEY_WORLD_22 = 182, ! TGKEY_WORLD_23 = 183, ! TGKEY_WORLD_24 = 184, ! TGKEY_WORLD_25 = 185, ! TGKEY_WORLD_26 = 186, ! TGKEY_WORLD_27 = 187, ! TGKEY_WORLD_28 = 188, ! TGKEY_WORLD_29 = 189, ! TGKEY_WORLD_30 = 190, ! TGKEY_WORLD_31 = 191, ! TGKEY_WORLD_32 = 192, ! TGKEY_WORLD_33 = 193, ! TGKEY_WORLD_34 = 194, ! TGKEY_WORLD_35 = 195, ! TGKEY_WORLD_36 = 196, ! TGKEY_WORLD_37 = 197, ! TGKEY_WORLD_38 = 198, ! TGKEY_WORLD_39 = 199, ! TGKEY_WORLD_40 = 200, ! TGKEY_WORLD_41 = 201, ! TGKEY_WORLD_42 = 202, ! TGKEY_WORLD_43 = 203, ! TGKEY_WORLD_44 = 204, ! TGKEY_WORLD_45 = 205, ! TGKEY_WORLD_46 = 206, ! TGKEY_WORLD_47 = 207, ! TGKEY_WORLD_48 = 208, ! TGKEY_WORLD_49 = 209, ! TGKEY_WORLD_50 = 210, ! TGKEY_WORLD_51 = 211, ! TGKEY_WORLD_52 = 212, ! TGKEY_WORLD_53 = 213, ! TGKEY_WORLD_54 = 214, ! TGKEY_WORLD_55 = 215, ! TGKEY_WORLD_56 = 216, ! TGKEY_WORLD_57 = 217, ! TGKEY_WORLD_58 = 218, ! TGKEY_WORLD_59 = 219, ! TGKEY_WORLD_60 = 220, ! TGKEY_WORLD_61 = 221, ! TGKEY_WORLD_62 = 222, ! TGKEY_WORLD_63 = 223, ! TGKEY_WORLD_64 = 224, ! TGKEY_WORLD_65 = 225, ! TGKEY_WORLD_66 = 226, ! TGKEY_WORLD_67 = 227, ! TGKEY_WORLD_68 = 228, ! TGKEY_WORLD_69 = 229, ! TGKEY_WORLD_70 = 230, ! TGKEY_WORLD_71 = 231, ! TGKEY_WORLD_72 = 232, ! TGKEY_WORLD_73 = 233, ! TGKEY_WORLD_74 = 234, ! TGKEY_WORLD_75 = 235, ! TGKEY_WORLD_76 = 236, ! TGKEY_WORLD_77 = 237, ! TGKEY_WORLD_78 = 238, ! TGKEY_WORLD_79 = 239, ! TGKEY_WORLD_80 = 240, ! TGKEY_WORLD_81 = 241, ! TGKEY_WORLD_82 = 242, ! TGKEY_WORLD_83 = 243, ! TGKEY_WORLD_84 = 244, ! TGKEY_WORLD_85 = 245, ! TGKEY_WORLD_86 = 246, ! TGKEY_WORLD_87 = 247, ! TGKEY_WORLD_88 = 248, ! TGKEY_WORLD_89 = 249, ! TGKEY_WORLD_90 = 250, ! TGKEY_WORLD_91 = 251, ! TGKEY_WORLD_92 = 252, ! TGKEY_WORLD_93 = 253, ! TGKEY_WORLD_94 = 254, ! TGKEY_WORLD_95 = 255, ! ! TGKEY_KP0 = 256, ! TGKEY_KP1 = 257, ! TGKEY_KP2 = 258, ! TGKEY_KP3 = 259, ! TGKEY_KP4 = 260, ! TGKEY_KP5 = 261, ! TGKEY_KP6 = 262, ! TGKEY_KP7 = 263, ! TGKEY_KP8 = 264, ! TGKEY_KP9 = 265, ! TGKEY_KP_PERIOD = 266, ! TGKEY_KP_DIVIDE = 267, ! TGKEY_KP_MULTIPLY = 268, ! TGKEY_KP_MINUS = 269, ! TGKEY_KP_PLUS = 270, ! TGKEY_KP_ENTER = 271, ! TGKEY_KP_EQUALS = 272, ! ! TGKEY_UP = 273, ! TGKEY_DOWN = 274, ! TGKEY_RIGHT = 275, ! TGKEY_LEFT = 276, ! TGKEY_INSERT = 277, ! TGKEY_HOME = 278, ! TGKEY_END = 279, ! TGKEY_PAGEUP = 280, ! TGKEY_PAGEDOWN = 281, ! ! TGKEY_F1 = 282, ! TGKEY_F2 = 283, ! TGKEY_F3 = 284, ! TGKEY_F4 = 285, ! TGKEY_F5 = 286, ! TGKEY_F6 = 287, ! TGKEY_F7 = 288, ! TGKEY_F8 = 289, ! TGKEY_F9 = 290, ! TGKEY_F10 = 291, ! TGKEY_F11 = 292, ! TGKEY_F12 = 293, ! TGKEY_F13 = 294, ! TGKEY_F14 = 295, ! TGKEY_F15 = 296, ! ! TGKEY_NUMLOCK = 300, ! TGKEY_CAPSLOCK = 301, ! TGKEY_SCROLLOCK = 302, ! TGKEY_RSHIFT = 303, ! TGKEY_LSHIFT = 304, ! TGKEY_RCTRL = 305, ! TGKEY_LCTRL = 306, ! TGKEY_RALT = 307, ! TGKEY_LALT = 308, ! TGKEY_RMETA = 309, ! TGKEY_LMETA = 310, ! TGKEY_LSUPER = 311, ! TGKEY_RSUPER = 312, ! TGKEY_MODE = 313, ! TGKEY_COMPOSE = 314, ! ! TGKEY_HELP = 315, ! TGKEY_PRINT = 316, ! TGKEY_SYSREQ = 317, ! TGKEY_BREAK = 318, ! TGKEY_MENU = 319, ! TGKEY_POWER = 320, ! TGKEY_EURO = 321, ! TGKEY_UNDO = 322, ! ! TGKEY_LAST ! }; ! ! /// Just a rename... ! typedef SDLMod tgKeyMod; ! ! /// Event type codes. Used to indentify the type of an event occuring. ! enum tgEventType { ! evActiveEvent, ! evBroadcast, ! evKeyDown, ! evKeyUp, ! evMouseMotion, ! evMouseButtonDown, ! evMouseButtonUp, ! evQuit ! }; ! ! /// Event command codes. ! enum tgEventCmdCode { ! cmdPreFrame, ! cmdProcessFrame, ! cmdPostFrame, ! cmdToggleFullscreen ! }; ! ! /// Application focus states. ! enum tgAppActiveState { ! tgAppMouseFocus, ! tgAppInputFocus, ! tgAppActive ! }; ! ! /// Button states for press/release. ! enum tgButtonState { ! tgPressed, ! tgReleased ! }; ! ! /// Mouse button definitions. ! enum tgMouseButton { ! tgButtonLeft = 1, ! tgButtonMiddle = 2, ! tgButtonRight = 3 ! }; ! ! /// Mouse button states for press/release. ! enum tgMouseButtonState { ! tgNonePressed = 0, ! tgLeftPressed = 1, ! tgMiddlePressed = 2, ! tgRightPressed = 3 ! }; ! ! /** ! * Holds info for app focus gain/lost event. ! * ! */ ! struct tgActiveEvent { ! /// Event type. ! tgEventType type; ! /// Whether it was gain or loss. 0 = loss, 1 = gain. ! uint8 gain; ! /// App focus state. ! tgAppActiveState state; ! }; ! ! /** ! * Event command struct. ! * ! */ ! struct tgEventCommand { ! /// Event command code. ! tgEventCmdCode code; ! }; ! ! /** ! * Key press info. ! * ! */ ! struct tgKeySym { ! /// Scancode. ! uint8 scancode; ! /// The key this event occured on. ! tgKey sym; ! /// Modified key. ! tgKeyMod mod; ! /// Unicode. ! uint16 unicode; ! }; ! ! /** ! * Keyboard event struct. ! * ! */ ! struct tgKeyboardEvent { ! /// Event type. ! tgEventType type; ! /// Button state. ! tgButtonState state; ! // Key press information. ! tgKeySym keysym; ! }; ! ! /** ! * Mouse motion event struct. ! * ! */ ! struct tgMouseMotionEvent { ! /// Event type. ! tgEventType type; ! /// Mouse button state. ! tgMouseButtonState state; ! /// X and Y pos of the mouse cursor. ! uint16 x, y; ! /// The change in mouse X and Y from the last position. ! sint16 xrel, yrel; ! }; ! ! /** ! * Mouse button event struct. ! * ! */ ! struct tgMouseButtonEvent { ! /// Event type. ! tgEventType type; ! /// Mouse button this even occured on. ! tgMouseButton button; ! /// Button state. ! tgButtonState state; ! /// Mouse position. ! uint16 x, y; ! }; ! ! /** ! * Quit event. Used on application quit. ! * ! */ ! struct tgQuitEvent { ! /// Event type. ! tgEventType type; ! }; ! ! /** ! * The TG event structure. ! * ! */ ! struct tgEvent { ! /// Event type. ! tgEventType type; ! /// Event command. ! tgEventCommand cmd; ! /// Active event. ! tgActiveEvent active; ! /// Keyboard event. ! tgKeyboardEvent key; ! /// Mouse motion event. ! tgMouseMotionEvent motion; ! /// Mouse button event. ! tgMouseButtonEvent button; ! /// Quit event. ! tgQuitEvent quit; ! }; ! ! ! /** @} */ ! } ! #endif // __TGLIB_TGENGINE_EVENT_H__ Index: gldefs.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/gldefs.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gldefs.h 27 Sep 2004 19:33:58 -0000 1.2 --- gldefs.h 28 Sep 2004 09:44:26 -0000 1.3 *************** *** 11,16 **** #include <GL/glext.h> #endif ! #include <SDL.h> #define TG_CUBEMAP GL_TEXTURE1 --- 11,19 ---- #include <GL/glext.h> #endif ! #ifdef TGWIN32 ! #include <SDL/SDL.h> ! #else #include <SDL.h> + #endif #define TG_CUBEMAP GL_TEXTURE1 *************** *** 18,22 **** #define TG_NORMALMAP GL_TEXTURE0 ! //Vbos --- 21,26 ---- #define TG_NORMALMAP GL_TEXTURE0 ! #define GL_VERTEX_PROGRAM_ARB 0x8620 ! #define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 //Vbos |
|
From: Seb <whi...@us...> - 2004-09-28 09:03:07
|
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19613 Modified Files: AUTHORS Log Message: New AUTHORS file Index: AUTHORS =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/AUTHORS,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AUTHORS 28 Sep 2004 09:00:57 -0000 1.2 --- AUTHORS 28 Sep 2004 09:02:58 -0000 1.3 *************** *** 1,4 **** Julien "silver" Rebetez : julien.rebetez *chez* epfl.ch ! Port to Mac OS X: Sebastien "whistle_master" Samyn : sebastien.samyn *chez* epfl.ch --- 1,4 ---- Julien "silver" Rebetez : julien.rebetez *chez* epfl.ch ! Mac OS X Port: Sebastien "whistle_master" Samyn : sebastien.samyn *chez* epfl.ch |
|
From: Seb <whi...@us...> - 2004-09-28 09:01:12
|
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19254 Modified Files: AUTHORS Log Message: New AUTHORS file Index: AUTHORS =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/AUTHORS,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** AUTHORS 26 Sep 2004 13:15:31 -0000 1.1.1.1 --- AUTHORS 28 Sep 2004 09:00:57 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- Julien "silver" Rebetez : julien.rebetez *chez* epfl.ch + Port to Mac OS X: + Sebastien "whistle_master" Samyn : sebastien.samyn *chez* epfl.ch |
|
From: Seb <whi...@us...> - 2004-09-27 22:13:36
|
Update of /cvsroot/epfl/tggame In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22536 Modified Files: Makefile.OSX Log Message: Makefile OSX Index: Makefile.OSX =================================================================== RCS file: /cvsroot/epfl/tggame/Makefile.OSX,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.OSX 27 Sep 2004 20:35:00 -0000 1.2 --- Makefile.OSX 27 Sep 2004 22:13:27 -0000 1.3 *************** *** 1,7 **** # TG Makefile ! CFLAGS = -DTGOSX -03 ! INCLUDEPATH = -I/sw/include/SDL -I./ -I../tgengine ! LINKPATH = -L../tgengine/out ! LIBS = `sdl-config --libs` -ltgengine -ljpeg -lm OBJ_EXT = o OBJSRC = $(wildcard *.cc) --- 1,7 ---- # TG Makefile ! CFLAGS = -O3 -DTGOSX ! INCLUDEPATH = -I/sw/include/SDL -I./ -I../tgengine-0.1 ! LINKPATH = -L../tgengine-0.1/out ! LIBS = `sdl-config --libs` -ltgengine -ljpeg -lm -lSDL_image OBJ_EXT = o OBJSRC = $(wildcard *.cc) *************** *** 16,19 **** clean: ! rm *.o ! rm *~ --- 16,20 ---- clean: ! rm -f tg ! rm -f *.o ! rm -f *~ |
|
From: Seb <whi...@us...> - 2004-09-27 22:11:19
|
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21962 Modified Files: Makefile.OSX texture.cc Log Message: Compilation OS X Index: Makefile.OSX =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/Makefile.OSX,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.OSX 27 Sep 2004 21:34:05 -0000 1.3 --- Makefile.OSX 27 Sep 2004 22:10:57 -0000 1.4 *************** *** 13,17 **** all : $(OBJS) ! g++ -dynamiclib `sdl-config --libs` -o out/libtgengine.dylib $(OBJS) clean : --- 13,17 ---- all : $(OBJS) ! g++ -dynamiclib `sdl-config --libs` -lSDL_image -o out/libtgengine.dylib $(OBJS) clean : Index: texture.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/texture.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** texture.cc 27 Sep 2004 21:34:05 -0000 1.3 --- texture.cc 27 Sep 2004 22:10:57 -0000 1.4 *************** *** 10,14 **** #endif #include "engine.h" ! #include "SDL/SDL_image.h" namespace tg --- 10,14 ---- #endif #include "engine.h" ! #include "SDL_image.h" namespace tg |
|
From: julien r. <jul...@us...> - 2004-09-27 21:41:49
|
Update of /cvsroot/epfl/tggame In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16070 Modified Files: Makefile.Linux config.cfg Log Message: Index: config.cfg =================================================================== RCS file: /cvsroot/epfl/tggame/config.cfg,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** config.cfg 27 Sep 2004 20:01:49 -0000 1.3 --- config.cfg 27 Sep 2004 21:41:34 -0000 1.4 *************** *** 5,7 **** -set lightpos.y 0 -set bump 0 - -wireframe --- 5,6 ---- Index: Makefile.Linux =================================================================== RCS file: /cvsroot/epfl/tggame/Makefile.Linux,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.Linux 27 Sep 2004 20:35:00 -0000 1.2 --- Makefile.Linux 27 Sep 2004 21:41:34 -0000 1.3 *************** *** 1,7 **** # TG Makefile CFLAGS = -O3 -DTGLINUX ! INCLUDEPATH = -I/usr/include/SDL -I./ -I../tgengine ! LINKPATH = -L../tgengine/out ! LIBS = -lGL -lSDL -lGLU -ltgengine -ljpeg -lm OBJ_EXT = o OBJSRC = $(wildcard *.cc) --- 1,7 ---- # TG Makefile CFLAGS = -O3 -DTGLINUX ! INCLUDEPATH = -I/usr/include/SDL -I./ -I../tgengine-0.1 ! LINKPATH = -L../tgengine-0.1/out ! LIBS = -lGL -lSDL -lGLU -ltgengine -ljpeg -lm -lSDL_image OBJ_EXT = o OBJSRC = $(wildcard *.cc) |
|
From: julien r. <jul...@us...> - 2004-09-27 21:34:21
|
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14486 Modified Files: Makefile Makefile.Linux Makefile.OSX d3map.cc defs.h glrenderer.cc glrenderernv15.cc texture.cc texture.h Log Message: chargement png et jpg affichage fps divers fix Index: Makefile =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile 27 Sep 2004 20:57:52 -0000 1.5 --- Makefile 27 Sep 2004 21:34:05 -0000 1.6 *************** *** 13,16 **** --- 13,17 ---- make -f Makefile.Linux + linuxDebug: make -f Makefile.Linux "CFLAGS = -ggdb -DDEBUG -DTGLINUX" Index: d3map.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/d3map.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** d3map.cc 27 Sep 2004 19:33:58 -0000 1.3 --- d3map.cc 27 Sep 2004 21:34:05 -0000 1.4 *************** *** 7,12 **** { FILE* fp = NULL; ! char* buffer; ! size_t size; numAreas = 0; --- 7,12 ---- { FILE* fp = NULL; ! char* buffer=NULL; ! // size_t size; numAreas = 0; *************** *** 41,43 **** ! } \ No newline at end of file --- 41,44 ---- ! } ! Index: defs.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/defs.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** defs.h 26 Sep 2004 13:15:06 -0000 1.1.1.1 --- defs.h 27 Sep 2004 21:34:05 -0000 1.2 *************** *** 15,18 **** --- 15,20 ---- { + #define TGSDL_IMAGE + #define SWAPFLOAT(name) name=Engine::pEndian->Float(name); #define SWAPLONG(name) name=Engine::pEndian->Long(name); Index: glrenderer.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/glrenderer.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** glrenderer.cc 27 Sep 2004 14:45:59 -0000 1.4 --- glrenderer.cc 27 Sep 2004 21:34:05 -0000 1.5 *************** *** 63,67 **** pDefaultFont = new Font(); ! LoadFont(pDefaultFont, "data/font.bmp"); bWireFrame = false; --- 63,67 ---- pDefaultFont = new Font(); ! LoadFont(pDefaultFont, "data/font.png"); bWireFrame = false; *************** *** 428,437 **** glEnable(GL_DEPTH_TEST); ! Begin2D(); ! RenderText(pDefaultFont, "X = rouge", 10, 0, 0.6); ! RenderText(pDefaultFont, "Y = vert", 10, 15, 0.6); ! RenderText(pDefaultFont, "Z = bleu", 10, 30, 0.6); ! End2D(); } --- 428,438 ---- glEnable(GL_DEPTH_TEST); ! char fps[50]; Begin2D(); ! RenderText(NULL, "X = rouge", 10, 0, 0.6); ! RenderText(NULL, "Y = vert", 10, 15, 0.6); ! RenderText(NULL, "Z = bleu", 10, 30, 0.6); ! sprintf (fps, "fps %.0f", Engine::pEngine->GetTimer()->GetFPS()); ! RenderText(NULL, fps, 10, 50, 0.6); End2D(); } Index: Makefile.Linux =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/Makefile.Linux,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.Linux 27 Sep 2004 20:35:00 -0000 1.2 --- Makefile.Linux 27 Sep 2004 21:34:05 -0000 1.3 *************** *** 6,10 **** OBJSRC = $(wildcard *.cc) OBJS = $(addsuffix .${OBJ_EXT}, $(basename $(OBJSRC))) ! CFLAGS = -DTGLINUX -O3 CC = g++ --- 6,10 ---- OBJSRC = $(wildcard *.cc) OBJS = $(addsuffix .${OBJ_EXT}, $(basename $(OBJSRC))) ! CFLAGS = -DTGLINUX -O3 -DDEBUG CC = g++ Index: Makefile.OSX =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/Makefile.OSX,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.OSX 27 Sep 2004 20:35:00 -0000 1.2 --- Makefile.OSX 27 Sep 2004 21:34:05 -0000 1.3 *************** *** 6,10 **** OBJSRC = $(wildcard *.cc) OBJS = $(addsuffix .${OBJ_EXT}, $(basename $(OBJSRC))) ! CFLAGS = -DTGOSX -O3 CC = g++ --- 6,10 ---- OBJSRC = $(wildcard *.cc) OBJS = $(addsuffix .${OBJ_EXT}, $(basename $(OBJSRC))) ! CFLAGS = -DTGOSX -O3 -DDEBUG CC = g++ Index: texture.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/texture.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** texture.cc 27 Sep 2004 19:33:58 -0000 1.2 --- texture.cc 27 Sep 2004 21:34:05 -0000 1.3 *************** *** 10,14 **** #endif #include "engine.h" ! namespace tg --- 10,14 ---- #endif #include "engine.h" ! #include "SDL/SDL_image.h" namespace tg *************** *** 33,37 **** glDeleteTextures (1, &iId); ! return LoadBMP (image, type); } --- 33,47 ---- glDeleteTextures (1, &iId); ! if (strstr(image, ".bmp") != NULL) ! return LoadBMP (image, type); ! if (strstr(image, ".tga") != NULL) ! #ifdef TGSDL_IMAGE ! return LoadTGA (image, type); ! if (strstr(image, ".png") != NULL) ! return LoadPNG (image, type); ! if (strstr(image, ".jpeg") != NULL || strstr(image, ".jpg") != NULL) ! return LoadJPG (image, type); ! #endif ! return false; } *************** *** 367,376 **** return true; } bool Texture::LoadJPG (char* image, texType type) { ! return false; } bool Texture::LoadArray (unsigned char* data, int w, int h, texType t) { --- 377,483 ---- return true; } + #ifdef TGSDL_IMAGE + //Code emprunte a Ogre3D + void Texture::FlipAroundY (int w, int h, unsigned char* pixels) + { + //on considere qu'on est en RGB8 + unsigned char* buffer = new unsigned char [w*h*3]; + unsigned char* dst = NULL; + unsigned char* src = pixels; + for (int y=0; y<h; y++) + { + int offset = ((y * w) + (w - 1)) * 3; + dst = buffer; + dst += offset; + for (int x=0; x<w; x++) + { + memcpy (dst, src, sizeof(unsigned char)*3); + dst -= 3; + src += 3; + } + } + memcpy (pixels, buffer, w*h*sizeof(unsigned char)*3); + delete buffer; + } + + void Texture::FlipAroundX (int w, int h, unsigned char* pixels) + { + //on considère qu'on est en RGB8 + int rowSpan = w*3; + unsigned char* buffer = new unsigned char [rowSpan*h]; + unsigned char* ptr1 = pixels, *ptr2 = buffer + ((h-1)*rowSpan); + for (int i=0; i<h; i++) + { + memcpy (ptr2, ptr1, rowSpan); + ptr1 += rowSpan; + ptr2 -= rowSpan; + } + memcpy (pixels, buffer, rowSpan*h); + delete buffer; + } + + + bool Texture::LoadPNG (char* image, texType type) + { + std::cout << "chargement de "<<image<<std::endl; + SDL_Surface* texture; + texture = IMG_Load(image); + + if (texture == NULL) + return false; + FlipAroundX (texture->w, texture->h, (unsigned char*)texture->pixels); + // FlipAroundX (texture->w, texture->h, (unsigned char*)texture->pixels); + // texture->pixels = ChangeTextureOrientation(texture->w, texture->h, (unsigned char*)texture->pixels); + + glGenTextures (1, &iId); + glBindTexture(GL_TEXTURE_2D, iId); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); + //TODO: CLAMP TO EDGE FAIT BUGGUER LES MAPS + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); + //priorite de la texture... ca ne semble pas vraiment utile + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, 1); + + gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGB, texture->w, texture->h, GL_RGB, GL_UNSIGNED_BYTE, texture->pixels); + SDL_FreeSurface(texture); + + return true; + } bool Texture::LoadJPG (char* image, texType type) { ! std::cout << "chargement de "<<image<<std::endl; ! ! SDL_Surface* texture; ! texture = IMG_Load(image); ! ! if (texture == NULL) ! return false; ! ! FlipAroundX (texture->w, texture->h, (unsigned char*)texture->pixels); ! ! glGenTextures (1, &iId); ! glBindTexture(GL_TEXTURE_2D, iId); ! ! glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_NEAREST); ! glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); ! //TODO: CLAMP TO EDGE FAIT BUGGUER LES MAPS ! //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); ! //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); ! //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); ! //priorite de la texture... ca ne semble pas vraiment utile ! //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, 1); ! ! gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGB, texture->w, texture->h, GL_RGB, GL_UNSIGNED_BYTE, texture->pixels); ! SDL_FreeSurface(texture); ! ! return true; } + #endif + bool Texture::LoadArray (unsigned char* data, int w, int h, texType t) { Index: texture.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/texture.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** texture.h 26 Sep 2004 13:15:17 -0000 1.1.1.1 --- texture.h 27 Sep 2004 21:34:05 -0000 1.2 *************** *** 88,93 **** --- 88,98 ---- bool LoadBMP (char*, texType); bool LoadTGA (char*, texType); + #ifdef TGSDL_IMAGE bool LoadJPG (char*, texType); + bool LoadPNG (char*, texType); + #endif bool LoadWhite (); + void FlipAroundY (int, int, unsigned char*); + void FlipAroundX (int, int, unsigned char*); texType GetTexType () { return tType; } unsigned int iId; Index: glrenderernv15.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/glrenderernv15.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** glrenderernv15.cc 27 Sep 2004 13:32:34 -0000 1.3 --- glrenderernv15.cc 27 Sep 2004 21:34:05 -0000 1.4 *************** *** 373,377 **** pDefaultFont = new Font(); ! LoadFont(pDefaultFont, "data/font.bmp"); bWireFrame = false; --- 373,377 ---- pDefaultFont = new Font(); ! LoadFont(pDefaultFont, "data/font.jpg"); bWireFrame = false; |
|
From: Gilles M. <kr...@us...> - 2004-09-27 20:58:52
|
Update of /cvsroot/epfl/tggame In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7502 Modified Files: Makefile Log Message: typo dans les Makefile Index: Makefile =================================================================== RCS file: /cvsroot/epfl/tggame/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile 27 Sep 2004 20:35:00 -0000 1.4 --- Makefile 27 Sep 2004 20:58:26 -0000 1.5 *************** *** 3,23 **** ## ! all : linux ! clean : rm -f tg rm -f *.o rm -f *~ ! linux : make -f Makefile.Linux ! linuxDebug : make -f Makefile.Linux "CFLAGS = -ggdb -DDEBUG -DTGLINUX -pg" ! mac : make -f Makefile.OSX ! macDebug : make -f Makefile.OSX "CFLAGS = -ggdb -DDEBUG -DTGOSX -pg" --- 3,23 ---- ## ! all: linux ! clean: rm -f tg rm -f *.o rm -f *~ ! linux: make -f Makefile.Linux ! linuxDebug: make -f Makefile.Linux "CFLAGS = -ggdb -DDEBUG -DTGLINUX -pg" ! mac: make -f Makefile.OSX ! macDebug: make -f Makefile.OSX "CFLAGS = -ggdb -DDEBUG -DTGOSX -pg" |
|
From: Gilles M. <kr...@us...> - 2004-09-27 20:58:09
|
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7350 Modified Files: Makefile Log Message: typo dans les Makefile Index: Makefile =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile 27 Sep 2004 20:34:49 -0000 1.4 --- Makefile 27 Sep 2004 20:57:52 -0000 1.5 *************** *** 3,23 **** ## ! all : linux ! clean : rm -f out/* rm -f *.o rm -f *~ ! linux : make -f Makefile.Linux ! linuxDebug : make -f Makefile.Linux "CFLAGS = -ggdb -DDEBUG -DTGLINUX" ! mac : make -f Makefile.OSX ! macDebug : make -f Makefile.OSX "CFLAGS = -ggdb -DDEBUG -DTGOSX" --- 3,23 ---- ## ! all: linux ! clean: rm -f out/* rm -f *.o rm -f *~ ! linux: make -f Makefile.Linux ! linuxDebug: make -f Makefile.Linux "CFLAGS = -ggdb -DDEBUG -DTGLINUX" ! mac: make -f Makefile.OSX ! macDebug: make -f Makefile.OSX "CFLAGS = -ggdb -DDEBUG -DTGOSX" |
|
From: Gilles M. <kr...@us...> - 2004-09-27 20:35:15
|
Update of /cvsroot/epfl/tggame In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3144 Modified Files: Makefile Makefile.Linux Makefile.OSX Log Message: Modification des Makefile afin d'ajouter les cibles : linux, linuxDebug, mac et macDebug Index: Makefile =================================================================== RCS file: /cvsroot/epfl/tggame/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile 27 Sep 2004 14:29:35 -0000 1.3 --- Makefile 27 Sep 2004 20:35:00 -0000 1.4 *************** *** 1,20 **** ! # TG Makefile ! CFLAGS = -ggdb -pg ! INCLUDEPATH = -I/usr/include/SDL -I./ -I../tgengine ! LINKPATH = -L../tgengine/out ! LIBS = -lGL -lSDL -lGLU -ltgengine -ljpeg -lm ! OBJ_EXT = o ! OBJSRC = $(wildcard *.cc) ! OBJS = $(addsuffix .${OBJ_EXT}, $(basename $(OBJSRC))) ! CC = g++ ! .cc.${OBJ_EXT}: ! $(CC) -c $(CFLAGS) -Wall $(INCLUDEPATH) $< -o $@ ! all: $(OBJS) ! g++ -o tg $(INCLUDEPATH) $(LINKPATH) $(LIBS) $(OBJS) ! ! clean: rm -f tg rm -f *.o ! rm -f *~ --- 1,23 ---- ! ## TG Engine Makefile ! # Ajoutez -DTGHIGHDEF pour construire la version haute resolution (stencil shadows, dot3 bump) ! ## ! all : linux ! clean : rm -f tg rm -f *.o ! rm -f *~ ! ! linux : ! make -f Makefile.Linux ! ! linuxDebug : ! make -f Makefile.Linux "CFLAGS = -ggdb -DDEBUG -DTGLINUX -pg" ! ! mac : ! make -f Makefile.OSX ! ! macDebug : ! make -f Makefile.OSX "CFLAGS = -ggdb -DDEBUG -DTGOSX -pg" ! Index: Makefile.Linux =================================================================== RCS file: /cvsroot/epfl/tggame/Makefile.Linux,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.Linux 27 Sep 2004 19:57:27 -0000 1.1 --- Makefile.Linux 27 Sep 2004 20:35:00 -0000 1.2 *************** *** 1,4 **** # TG Makefile ! CFLAGS = -ggdb -pg INCLUDEPATH = -I/usr/include/SDL -I./ -I../tgengine LINKPATH = -L../tgengine/out --- 1,4 ---- # TG Makefile ! CFLAGS = -O3 -DTGLINUX INCLUDEPATH = -I/usr/include/SDL -I./ -I../tgengine LINKPATH = -L../tgengine/out Index: Makefile.OSX =================================================================== RCS file: /cvsroot/epfl/tggame/Makefile.OSX,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.OSX 27 Sep 2004 19:57:27 -0000 1.1 --- Makefile.OSX 27 Sep 2004 20:35:00 -0000 1.2 *************** *** 1,4 **** # TG Makefile ! CFLAGS = -DTGOSX -ggdb -pg INCLUDEPATH = -I/sw/include/SDL -I./ -I../tgengine LINKPATH = -L../tgengine/out --- 1,4 ---- # TG Makefile ! CFLAGS = -DTGOSX -03 INCLUDEPATH = -I/sw/include/SDL -I./ -I../tgengine LINKPATH = -L../tgengine/out |
|
From: Gilles M. <kr...@us...> - 2004-09-27 20:35:14
|
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3148 Modified Files: Makefile Makefile.Linux Makefile.OSX Log Message: Modification des Makefile afin d'ajouter les cibles : linux, linuxDebug, mac et macDebug Index: Makefile =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile 27 Sep 2004 13:37:29 -0000 1.3 --- Makefile 27 Sep 2004 20:34:49 -0000 1.4 *************** *** 3,26 **** ## ! OBJ_EXT = o ! OBJSRC = $(wildcard *.cc) ! OBJS = $(addsuffix .${OBJ_EXT}, $(basename $(OBJSRC))) ! CFLAGS = -ggdb -DDEBUG -DTGLINUX #-pg ! #CFLAGS = -DTGLINUX -O3 ! CC = g++ ! #CC = i586-mingw32msvc-g++ ! ! .cc.${OBJ_EXT}: ! $(CC) -c $(CFLAGS) -Wall -I/usr/include/SDL -I./ $< -o $@ ! ! #all : $(OBJS) ! # ar rc out/libtgengine.a $(OBJS) ! # ranlib out/libtgengine.a ! ! all : $(OBJS) ! gcc -shared -o out/libtgengine.so $(OBJS) clean : rm -f out/* rm -f *.o ! rm -f *~ --- 3,23 ---- ## ! all : linux clean : rm -f out/* rm -f *.o ! rm -f *~ ! ! linux : ! make -f Makefile.Linux ! ! linuxDebug : ! make -f Makefile.Linux "CFLAGS = -ggdb -DDEBUG -DTGLINUX" ! ! mac : ! make -f Makefile.OSX ! ! macDebug : ! make -f Makefile.OSX "CFLAGS = -ggdb -DDEBUG -DTGOSX" ! Index: Makefile.Linux =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/Makefile.Linux,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.Linux 27 Sep 2004 19:43:10 -0000 1.1 --- Makefile.Linux 27 Sep 2004 20:35:00 -0000 1.2 *************** *** 6,21 **** OBJSRC = $(wildcard *.cc) OBJS = $(addsuffix .${OBJ_EXT}, $(basename $(OBJSRC))) ! CFLAGS = -ggdb -DDEBUG -DTGLINUX #-pg ! #CFLAGS = -DTGLINUX -O3 CC = g++ - #CC = i586-mingw32msvc-g++ .cc.${OBJ_EXT}: $(CC) -c $(CFLAGS) -Wall -I/usr/include/SDL -I./ $< -o $@ - #all : $(OBJS) - # ar rc out/libtgengine.a $(OBJS) - # ranlib out/libtgengine.a - all : $(OBJS) gcc -shared -o out/libtgengine.so $(OBJS) --- 6,15 ---- OBJSRC = $(wildcard *.cc) OBJS = $(addsuffix .${OBJ_EXT}, $(basename $(OBJSRC))) ! CFLAGS = -DTGLINUX -O3 CC = g++ .cc.${OBJ_EXT}: $(CC) -c $(CFLAGS) -Wall -I/usr/include/SDL -I./ $< -o $@ all : $(OBJS) gcc -shared -o out/libtgengine.so $(OBJS) Index: Makefile.OSX =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/Makefile.OSX,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.OSX 27 Sep 2004 19:43:10 -0000 1.1 --- Makefile.OSX 27 Sep 2004 20:35:00 -0000 1.2 *************** *** 6,21 **** OBJSRC = $(wildcard *.cc) OBJS = $(addsuffix .${OBJ_EXT}, $(basename $(OBJSRC))) ! CFLAGS = -ggdb -DDEBUG -DTGOSX #-pg ! #CFLAGS = -DTGLINUX -O3 CC = g++ - #CC = i586-mingw32msvc-g++ .cc.${OBJ_EXT}: $(CC) -c $(CFLAGS) -Wall -I/sw/include/SDL -I./ $< -o $@ - #all : $(OBJS) - # ar rc out/libtgengine.a $(OBJS) - # ranlib out/libtgengine.a - all : $(OBJS) g++ -dynamiclib `sdl-config --libs` -o out/libtgengine.dylib $(OBJS) --- 6,15 ---- OBJSRC = $(wildcard *.cc) OBJS = $(addsuffix .${OBJ_EXT}, $(basename $(OBJSRC))) ! CFLAGS = -DTGOSX -O3 CC = g++ .cc.${OBJ_EXT}: $(CC) -c $(CFLAGS) -Wall -I/sw/include/SDL -I./ $< -o $@ all : $(OBJS) g++ -dynamiclib `sdl-config --libs` -o out/libtgengine.dylib $(OBJS) |
|
From: Gilles M. <kr...@us...> - 2004-09-27 20:01:58
|
Update of /cvsroot/epfl/tggame In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29261 Modified Files: config.cfg Log Message: Fichier de config... Index: config.cfg =================================================================== RCS file: /cvsroot/epfl/tggame/config.cfg,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** config.cfg 27 Sep 2004 13:34:27 -0000 1.2 --- config.cfg 27 Sep 2004 20:01:49 -0000 1.3 *************** *** 4,6 **** -set stencilshadows 0 -set lightpos.y 0 ! -set bump 1 --- 4,7 ---- -set stencilshadows 0 -set lightpos.y 0 ! -set bump 0 ! -wireframe |
|
From: Seb <whi...@us...> - 2004-09-27 19:57:36
|
Update of /cvsroot/epfl/tggame In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28316 Added Files: Makefile.Linux Makefile.OSX Log Message: Makefile.Linux et Makefile.OSX --- NEW FILE: Makefile.Linux --- # TG Makefile CFLAGS = -ggdb -pg INCLUDEPATH = -I/usr/include/SDL -I./ -I../tgengine LINKPATH = -L../tgengine/out LIBS = -lGL -lSDL -lGLU -ltgengine -ljpeg -lm OBJ_EXT = o OBJSRC = $(wildcard *.cc) OBJS = $(addsuffix .${OBJ_EXT}, $(basename $(OBJSRC))) CC = g++ .cc.${OBJ_EXT}: $(CC) -c $(CFLAGS) -Wall $(INCLUDEPATH) $< -o $@ all: $(OBJS) g++ -o tg $(INCLUDEPATH) $(LINKPATH) $(LIBS) $(OBJS) clean: rm -f tg rm -f *.o rm -f *~ --- NEW FILE: Makefile.OSX --- # TG Makefile CFLAGS = -DTGOSX -ggdb -pg INCLUDEPATH = -I/sw/include/SDL -I./ -I../tgengine LINKPATH = -L../tgengine/out LIBS = `sdl-config --libs` -ltgengine -ljpeg -lm OBJ_EXT = o OBJSRC = $(wildcard *.cc) OBJS = $(addsuffix .${OBJ_EXT}, $(basename $(OBJSRC))) CC = g++ .cc.${OBJ_EXT}: $(CC) -c $(CFLAGS) -Wall $(INCLUDEPATH) $< -o $@ all: $(OBJS) g++ -o tg -Xlinker -bind_at_load $(INCLUDEPATH) $(LINKPATH) $(LIBS) $(OBJS) clean: rm *.o rm *~ |
|
From: Seb <whi...@us...> - 2004-09-27 19:43:22
|
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25173 Added Files: Makefile.Linux Makefile.OSX Log Message: Makefile.Linux et Makefile.OSX --- NEW FILE: Makefile.Linux --- ## TG Engine Makefile # Ajoutez -DTGHIGHDEF pour construire la version haute resolution (stencil shadows, dot3 bump) ## OBJ_EXT = o OBJSRC = $(wildcard *.cc) OBJS = $(addsuffix .${OBJ_EXT}, $(basename $(OBJSRC))) CFLAGS = -ggdb -DDEBUG -DTGLINUX #-pg #CFLAGS = -DTGLINUX -O3 CC = g++ #CC = i586-mingw32msvc-g++ .cc.${OBJ_EXT}: $(CC) -c $(CFLAGS) -Wall -I/usr/include/SDL -I./ $< -o $@ #all : $(OBJS) # ar rc out/libtgengine.a $(OBJS) # ranlib out/libtgengine.a all : $(OBJS) gcc -shared -o out/libtgengine.so $(OBJS) clean : rm -f out/* rm -f *.o rm -f *~ --- NEW FILE: Makefile.OSX --- ## TG Engine Makefile # Ajoutez -DTGHIGHDEF pour construire la version haute resolution (stencil shadows, dot3 bump) ## OBJ_EXT = o OBJSRC = $(wildcard *.cc) OBJS = $(addsuffix .${OBJ_EXT}, $(basename $(OBJSRC))) CFLAGS = -ggdb -DDEBUG -DTGOSX #-pg #CFLAGS = -DTGLINUX -O3 CC = g++ #CC = i586-mingw32msvc-g++ .cc.${OBJ_EXT}: $(CC) -c $(CFLAGS) -Wall -I/sw/include/SDL -I./ $< -o $@ #all : $(OBJS) # ar rc out/libtgengine.a $(OBJS) # ranlib out/libtgengine.a all : $(OBJS) g++ -dynamiclib `sdl-config --libs` -o out/libtgengine.dylib $(OBJS) clean : rm *.o rm *~ |
|
From: Seb <whi...@us...> - 2004-09-27 19:34:19
|
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23481 Modified Files: d3map.cc gldefs.h texture.cc tgglext.cc tgglext.h vshader.h Log Message: Portage OSX Index: tgglext.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/tgglext.cc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** tgglext.cc 26 Sep 2004 13:15:34 -0000 1.1.1.1 --- tgglext.cc 27 Sep 2004 19:33:58 -0000 1.2 *************** *** 39,42 **** --- 39,45 ---- #define GETARBPOINTER(var,type,name) var = (type)SDL_GL_GetProcAddress(name); #endif + #ifdef TGOSX + #define GETARBPOINTER(var,type,name) var = (type)SDL_GL_GetProcAddress(name); + #endif Index: d3map.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/d3map.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** d3map.cc 27 Sep 2004 12:48:16 -0000 1.2 --- d3map.cc 27 Sep 2004 19:33:58 -0000 1.3 *************** *** 18,22 **** } ! getline (&buffer, &size, fp); Log ("%s", buffer); --- 18,22 ---- } ! //getline (&buffer, &size, fp); Log ("%s", buffer); *************** *** 41,45 **** ! } ! ! --- 41,43 ---- ! } \ No newline at end of file Index: tgglext.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/tgglext.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** tgglext.h 26 Sep 2004 13:15:34 -0000 1.1.1.1 --- tgglext.h 27 Sep 2004 19:33:58 -0000 1.2 *************** *** 4,13 **** #include "gldefs.h" //#define GL_GLEXT_PROTOTYPES - #include <GL/glext.h> //#undef GL_GLEXT_PROTOTYPES namespace tg { extern PFNGLACTIVETEXTUREPROC _glActiveTextureARB; extern PFNGLMULTITEXCOORD3FARBPROC _glMultiTexCoord3fARB; --- 4,46 ---- #include "gldefs.h" //#define GL_GLEXT_PROTOTYPES //#undef GL_GLEXT_PROTOTYPES + #ifndef APIENTRY + #define APIENTRY + #endif + namespace tg { + typedef void (APIENTRY * PFNGLACTIVETEXTUREPROC) (GLenum texture); + typedef void (APIENTRY * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); + + typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); + typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); + typedef void (APIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); + typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); + + typedef void (APIENTRY * PFNGLBINDBUFFERARBPROC)(GLenum target, GLuint buffer); + typedef void (APIENTRY * PFNGLDELETEBUFFERSARBPROC)(GLsizei n, const GLuint *buffers); + typedef void (APIENTRY * PFNGLGENBUFFERSARBPROC)(GLsizei n, GLuint *buffers); + typedef void (APIENTRY * PFNGLBUFFERDATAARBPROC) (GLenum target, int size, const GLvoid *data, GLenum usage); + + typedef void (APIENTRY * PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); + typedef void (APIENTRY * PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); + typedef void (APIENTRY * PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void *string); + typedef void (APIENTRY * PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); + + typedef void (APIENTRY * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); + typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); + typedef void (APIENTRY * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); + typedef void (APIENTRY * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); + typedef void (APIENTRY * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); + + typedef void (APIENTRY * PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); + typedef void (APIENTRY * PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); + typedef void (APIENTRY * PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); + typedef void (APIENTRY * PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); + typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); + extern PFNGLACTIVETEXTUREPROC _glActiveTextureARB; extern PFNGLMULTITEXCOORD3FARBPROC _glMultiTexCoord3fARB; *************** *** 39,42 **** --- 72,80 ---- extern PFNGLPROGRAMPARAMETER4FNVPROC _glProgramParameter4fNV; + #define GL_VERTEX_PROGRAM_NV 0x8620 + #define GL_PROGRAM_ERROR_POSITION_NV 0x864B + #define GL_IDENTITY_NV 0x862A + #define GL_MODELVIEW_PROJECTION_NV 0x8629 + void InitARBFunctions (); Index: texture.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/texture.cc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** texture.cc 26 Sep 2004 13:15:16 -0000 1.1.1.1 --- texture.cc 27 Sep 2004 19:33:58 -0000 1.2 *************** *** 2,7 **** #include <stdlib.h> //TODO: remove ! #include "GL/gl.h" ! #include "GL/glu.h" #include "engine.h" --- 2,12 ---- #include <stdlib.h> //TODO: remove ! #if defined (TGOSX) ! #include <OpenGL/gl.h> ! #include <OpenGL/glu.h> ! #else ! #include <GL/gl.h> ! #include <GL/glu.h> ! #endif #include "engine.h" Index: vshader.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/vshader.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** vshader.h 27 Sep 2004 12:48:16 -0000 1.2 --- vshader.h 27 Sep 2004 19:33:58 -0000 1.3 *************** *** 1,29 **** ! #ifndef _TGVSHADER_H ! #define _TGVSHADER_H ! ! #include "gldefs.h" ! ! namespace tg ! { ! ! /** ! * Classe de gestion des vertex shaders ! */ ! class VShader ! { ! public: ! VShader(const char* name); ! void Enable (); ! void Disable (); ! void Bind (); ! void Bind (const float* value, ...); ! void SetParams(const float* value, ...); ! protected: ! GLhandleARB shader; ! }; ! ! } ! ! #endif ! ! --- 1,27 ---- ! #ifndef _TGVSHADER_H ! #define _TGVSHADER_H ! ! #include "gldefs.h" ! ! namespace tg ! { ! ! /** ! * Classe de gestion des vertex shaders ! */ ! class VShader ! { ! public: ! VShader(const char* name); ! void Enable (); ! void Disable (); ! void Bind (); ! void Bind (const float* value, ...); ! void SetParams(const float* value, ...); ! protected: ! //GLhandleARB shader; ! }; ! ! } ! ! #endif \ No newline at end of file Index: gldefs.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/gldefs.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gldefs.h 26 Sep 2004 13:15:23 -0000 1.1.1.1 --- gldefs.h 27 Sep 2004 19:33:58 -0000 1.2 *************** *** 2,9 **** #define _TGGLDEFS_H #include <GL/gl.h> #include <GL/glu.h> - #include <SDL/SDL.h> #include <GL/glext.h> #define TG_CUBEMAP GL_TEXTURE1 --- 2,16 ---- #define _TGGLDEFS_H + #if defined (TGOSX) + #include <OpenGL/gl.h> + #include <OpenGL/glu.h> + #include <OpenGL/glext.h> + #else #include <GL/gl.h> #include <GL/glu.h> #include <GL/glext.h> + #endif + + #include <SDL.h> #define TG_CUBEMAP GL_TEXTURE1 |
|
From: Seb <whi...@us...> - 2004-09-27 19:03:50
|
Update of /cvsroot/epfl/tgengine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17168 Modified Files: AUTHORS Changelog d3map.cc gldefs.h texture.cc tgglext.cc tgglext.h vshader.h Log Message: Compile sur OS X Index: AUTHORS =================================================================== RCS file: /cvsroot/epfl/tgengine/AUTHORS,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AUTHORS 23 Jun 2004 21:30:35 -0000 1.1 --- AUTHORS 27 Sep 2004 19:03:37 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- Julien "silver" Rebetez : julien.rebetez *chez* epfl.ch + Mac OS X: Sebastien "Seb" Samyn: sebatien.samyn *chez* epfl.ch + Index: tgglext.cc =================================================================== RCS file: /cvsroot/epfl/tgengine/tgglext.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tgglext.cc 25 Sep 2004 11:40:21 -0000 1.3 --- tgglext.cc 27 Sep 2004 19:03:37 -0000 1.4 *************** *** 39,43 **** #define GETARBPOINTER(var,type,name) var = (type)SDL_GL_GetProcAddress(name); #endif ! void InitARBFunctions() --- 39,45 ---- #define GETARBPOINTER(var,type,name) var = (type)SDL_GL_GetProcAddress(name); #endif ! #ifdef TGOSX ! #define GETARBPOINTER(var,type,name) var = (type)SDL_GL_GetProcAddress(name); ! #endif void InitARBFunctions() Index: Changelog =================================================================== RCS file: /cvsroot/epfl/tgengine/Changelog,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Changelog 11 Jul 2004 15:43:55 -0000 1.1 --- Changelog 27 Sep 2004 19:03:37 -0000 1.2 *************** *** 1,3 **** --- 1,8 ---- --------------- + 27 Sept. 2004 + --------------- + * Compile sur Mac OS X + + --------------- 23 juin 2004 --------------- Index: d3map.cc =================================================================== RCS file: /cvsroot/epfl/tgengine/d3map.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** d3map.cc 25 Sep 2004 11:40:21 -0000 1.1 --- d3map.cc 27 Sep 2004 19:03:37 -0000 1.2 *************** *** 18,22 **** } ! getline (&buffer, &size, fp); Log ("%s", buffer); --- 18,22 ---- } ! //getline (&buffer, &size, fp); Log ("%s", buffer); Index: gldefs.h =================================================================== RCS file: /cvsroot/epfl/tgengine/gldefs.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gldefs.h 25 Sep 2004 11:40:21 -0000 1.6 --- gldefs.h 27 Sep 2004 19:03:37 -0000 1.7 *************** *** 2,9 **** #define _TGGLDEFS_H #include <GL/gl.h> #include <GL/glu.h> - #include <SDL/SDL.h> #include <GL/glext.h> #define TG_CUBEMAP GL_TEXTURE1 --- 2,16 ---- #define _TGGLDEFS_H + #if defined (TGOSX) + #include <OpenGL/gl.h> + #include <OpenGL/glu.h> + #include <OpenGL/glext.h> + #else #include <GL/gl.h> #include <GL/glu.h> #include <GL/glext.h> + #endif + + #include <SDL.h> #define TG_CUBEMAP GL_TEXTURE1 Index: tgglext.h =================================================================== RCS file: /cvsroot/epfl/tgengine/tgglext.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tgglext.h 25 Sep 2004 11:40:21 -0000 1.3 --- tgglext.h 27 Sep 2004 19:03:37 -0000 1.4 *************** *** 4,13 **** #include "gldefs.h" //#define GL_GLEXT_PROTOTYPES - #include <GL/glext.h> //#undef GL_GLEXT_PROTOTYPES namespace tg { extern PFNGLACTIVETEXTUREPROC _glActiveTextureARB; extern PFNGLMULTITEXCOORD3FARBPROC _glMultiTexCoord3fARB; --- 4,46 ---- #include "gldefs.h" //#define GL_GLEXT_PROTOTYPES //#undef GL_GLEXT_PROTOTYPES + #ifndef APIENTRY + #define APIENTRY + #endif + namespace tg { + typedef void (APIENTRY * PFNGLACTIVETEXTUREPROC) (GLenum texture); + typedef void (APIENTRY * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); + + typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); + typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); + typedef void (APIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); + typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); + + typedef void (APIENTRY * PFNGLBINDBUFFERARBPROC)(GLenum target, GLuint buffer); + typedef void (APIENTRY * PFNGLDELETEBUFFERSARBPROC)(GLsizei n, const GLuint *buffers); + typedef void (APIENTRY * PFNGLGENBUFFERSARBPROC)(GLsizei n, GLuint *buffers); + typedef void (APIENTRY * PFNGLBUFFERDATAARBPROC) (GLenum target, int size, const GLvoid *data, GLenum usage); + + typedef void (APIENTRY * PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); + typedef void (APIENTRY * PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); + typedef void (APIENTRY * PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void *string); + typedef void (APIENTRY * PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); + + typedef void (APIENTRY * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); + typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); + typedef void (APIENTRY * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); + typedef void (APIENTRY * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); + typedef void (APIENTRY * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); + + typedef void (APIENTRY * PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); + typedef void (APIENTRY * PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); + typedef void (APIENTRY * PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); + typedef void (APIENTRY * PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); + typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); + extern PFNGLACTIVETEXTUREPROC _glActiveTextureARB; extern PFNGLMULTITEXCOORD3FARBPROC _glMultiTexCoord3fARB; *************** *** 39,42 **** --- 72,80 ---- extern PFNGLPROGRAMPARAMETER4FNVPROC _glProgramParameter4fNV; + #define GL_VERTEX_PROGRAM_NV 0x8620 + #define GL_PROGRAM_ERROR_POSITION_NV 0x864B + #define GL_IDENTITY_NV 0x862A + #define GL_MODELVIEW_PROJECTION_NV 0x8629 + void InitARBFunctions (); Index: texture.cc =================================================================== RCS file: /cvsroot/epfl/tgengine/texture.cc,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** texture.cc 25 Sep 2004 11:40:21 -0000 1.12 --- texture.cc 27 Sep 2004 19:03:37 -0000 1.13 *************** *** 2,10 **** #include <stdlib.h> //TODO: remove ! #include "GL/gl.h" ! #include "GL/glu.h" #include "engine.h" - namespace tg { --- 2,14 ---- #include <stdlib.h> //TODO: remove ! #if defined (TGOSX) ! #include <OpenGL/gl.h> ! #include <OpenGL/glu.h> ! #else ! #include <GL/gl.h> ! #include <GL/glu.h> ! #endif #include "engine.h" namespace tg { Index: vshader.h =================================================================== RCS file: /cvsroot/epfl/tgengine/vshader.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** vshader.h 25 Sep 2004 11:40:21 -0000 1.3 --- vshader.h 27 Sep 2004 19:03:37 -0000 1.4 *************** *** 20,24 **** void SetParams(const float* value, ...); protected: ! GLhandleARB shader; }; --- 20,24 ---- void SetParams(const float* value, ...); protected: ! //GLhandleARB shader; }; |
|
From: julien r. <jul...@us...> - 2004-09-27 17:45:29
|
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv695 Modified Files: Changelog guimanager.cc scenemanager.cc Log Message: plantage OSX Index: guimanager.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/guimanager.cc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** guimanager.cc 26 Sep 2004 13:15:21 -0000 1.1.1.1 --- guimanager.cc 27 Sep 2004 17:45:05 -0000 1.2 *************** *** 44,48 **** void GuiManager::Render () { ! ContainerList::iterator i = mContainers.begin (); for ( ; i!=mContainers.end(); i++) { --- 44,49 ---- void GuiManager::Render () { ! //FIXME: Plantage sur OSX ! /*ContainerList::iterator i = mContainers.begin (); for ( ; i!=mContainers.end(); i++) { *************** *** 51,55 **** //rendu du curseur de la souris if (pCursor && bDrawCursor) ! Engine::pRenderer->Render2DImage (pCursor); } --- 52,57 ---- //rendu du curseur de la souris if (pCursor && bDrawCursor) ! Engine::pRenderer->Render2DImage (pCursor);*/ ! } Index: scenemanager.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/scenemanager.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** scenemanager.cc 27 Sep 2004 12:48:16 -0000 1.2 --- scenemanager.cc 27 Sep 2004 17:45:05 -0000 1.3 *************** *** 205,210 **** } ! ! PointLight* pl = pFirstPointLight; int count = 0; if (pl!=NULL) --- 205,210 ---- } ! //FIXME: Plantage OSX ! /*PointLight* pl = pFirstPointLight; int count = 0; if (pl!=NULL) *************** *** 225,229 **** Engine::pRenderer->RenderText(NULL, buffer, 10,100, 0.6); Engine::pRenderer->End2D(); ! #endif /*EmittersList::iterator j = mEmitters.begin (); --- 225,229 ---- Engine::pRenderer->RenderText(NULL, buffer, 10,100, 0.6); Engine::pRenderer->End2D(); ! #endif*/ /*EmittersList::iterator j = mEmitters.begin (); Index: Changelog =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/Changelog,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Changelog 27 Sep 2004 16:18:40 -0000 1.3 --- Changelog 27 Sep 2004 17:45:05 -0000 1.4 *************** *** 2,11 **** 27 septembre 2004 --------------- ! Krtek, Silver: * code cleaning (plus de warnings à la compilation) Silver: * le moteur physique tente de faire monter les petits obstacles (escaliers & autres) --------------- --- 2,13 ---- 27 septembre 2004 --------------- ! Krtek * code cleaning (plus de warnings à la compilation) + * modification des Makefile Silver: * le moteur physique tente de faire monter les petits obstacles (escaliers & autres) + * code cleaning --------------- |
|
From: julien r. <jul...@us...> - 2004-09-27 16:31:46
|
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9571 Modified Files: q3bsp.cc Log Message: repertoire pour les textures est maintenant data/textures Index: q3bsp.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/q3bsp.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** q3bsp.cc 27 Sep 2004 14:45:59 -0000 1.4 --- q3bsp.cc 27 Sep 2004 16:31:35 -0000 1.5 *************** *** 686,691 **** //std::string tex("textures/gothic_block/blocks15"); //strcat (pTexturesInfos[i].strName, ".bmp"); ! pMaterials[i].SetFirstTexture(pTexManager->LoadTexture(/*pTexturesInfos[i].strName*/(tex+".bmp").data(), TG_TEXTURE_2D)); ! pMaterials[i].SetNormalTexture(pTexManager->LoadTexture((tex+"_local.bmp").data(), TG_TEXTURE_2D)); } pSpotLight.SetFirstTexture(pTexManager->LoadTexture("spot.bmp", TG_TEXTURE_2D)); --- 686,691 ---- //std::string tex("textures/gothic_block/blocks15"); //strcat (pTexturesInfos[i].strName, ".bmp"); ! pMaterials[i].SetFirstTexture(pTexManager->LoadTexture(/*pTexturesInfos[i].strName*/("data/"+tex+".bmp").data(), TG_TEXTURE_2D)); ! pMaterials[i].SetNormalTexture(pTexManager->LoadTexture(("data/"+tex+"_local.bmp").data(), TG_TEXTURE_2D)); } pSpotLight.SetFirstTexture(pTexManager->LoadTexture("spot.bmp", TG_TEXTURE_2D)); |
|
From: julien r. <jul...@us...> - 2004-09-27 16:19:15
|
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6929 Modified Files: Changelog physicengine.cc Log Message: monte les escaliers Index: physicengine.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/physicengine.cc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** physicengine.cc 27 Sep 2004 15:17:28 -0000 1.6 --- physicengine.cc 27 Sep 2004 16:18:40 -0000 1.7 *************** *** 71,74 **** --- 71,75 ---- */ #define PLAYER_HEIGHT 80 + #define STEPSIZE 10 void PhysicEngine::Move (float eTime) { *************** *** 99,144 **** if (pLevel && !n->bNoClip) { ! /*vVeloc1 = n->vVelocity; ! vVeloc2 = n->vVelocity; ! pos2.y += PLAYER_HEIGHT; ! StepSlideMove(n, eTime, vVeloc1, pos1); ! //StepSlideMove(n, eTime, vVeloc2, pos2); ! //if (sqrt((vVeloc1.x-pos.x)*(vVeloc1.x-pos.x)+(vVeloc1.z-pos.z)*(vVeloc1.z-pos.z)) >= sqrt((vVeloc2.x-pos.x)*(vVeloc2.x-pos.x)+(vVeloc2.z-pos.z)*(vVeloc2.z-pos.z))) ! n->SetPosition(n->GetPosition()+vVeloc1*eTime);*/ ! //else ! //n->SetPosition(n->GetPosition()+vVeloc2*eTime); ! Vector3 vVelocity = n->vVelocity; Vector3 vUpVelocity = n->vVelocity; Vector3 vPos = n->GetPosition(); ! Vector3 vUpPos = n->GetPosition() + (Vector3::UNIT_Y*50); float distx, distz; StepSlideMove (n, eTime, vVelocity, vPos); ! distx = (vVelocity.x - vPos.x); distx *= distx; ! distz = (vVelocity.z - vPos.z); distz *= distz; float dist = sqrt(distx+distz); ! ! StepSlideMove (n, eTime, vVelocity, vUpPos); ! distx = (vVelocity.x - vPos.x); distx *= distx; ! distz = (vVelocity.z - vPos.z); distz *= distz; float updist = sqrt(distx+distz); ! //FIXME: ON DOIT CALCULER LA DISTANCE SUR LES X ET Z, ___SANS___ Y ! if (updist > dist) ! n->SetPosition(vUpPos + vUpVelocity*eTime); ! else ! n->SetPosition(vPos + vVelocity*eTime); ! ! ! ! //StepSlideMove(n, eTime, n->vVelocity, n->GetPosition()); ! //n->SetPosition(n->GetPosition()+n->vVelocity*eTime); if (pLevel->CheckRayMove(n->GetPosition(), n->GetPosition()+Vector3::NEGATIVE_UNIT_Y*PLAYER_HEIGHT, TRACE_RAY, 0).Fraction < 1.0f) n->bOnGround = true; --- 100,138 ---- if (pLevel && !n->bNoClip) { ! //on essaie de faire monter les petits obstacles sur les y (escaliers, rebords) au joueur. Pour cela, on test si lorsqu'on monte ! //le joueur de STEPSIZE, il arrive à avancer plus sur les x et les z (mais _pas_ les y) ! ////TODO: lorsqu'on monte les escaliers, ça se fait par petit saut (normal, on ajoute 10 a la position en un coup. ! //Il faudrait faire ça de manière à ce qu'on ait l'impression de glisser sur les escaliers Vector3 vVelocity = n->vVelocity; Vector3 vUpVelocity = n->vVelocity; Vector3 vPos = n->GetPosition(); ! Vector3 vNewPos = vPos; ! Vector3 vUpPos = n->GetPosition() + (Vector3::UNIT_Y*STEPSIZE); ! Vector3 vUpNewPos = vUpPos; float distx, distz; StepSlideMove (n, eTime, vVelocity, vPos); ! vNewPos += vVelocity*eTime; ! distx = (vNewPos.x - vPos.x); distx *= distx; ! distz = (vNewPos.z - vPos.z); distz *= distz; float dist = sqrt(distx+distz); ! ! StepSlideMove (n, eTime, vUpVelocity, vUpPos); ! vUpNewPos += vUpVelocity*eTime; ! distx = (vUpNewPos.x - vUpPos.x); distx *= distx; ! distz = (vUpNewPos.z - vUpPos.z); distz *= distz; float updist = sqrt(distx+distz); ! if (updist > dist) //on passe l'obstacle ! n->SetPosition(vUpNewPos); ! else //l'obstacle est trop haut ! n->SetPosition(vNewPos); + //Classification de la position if (pLevel->CheckRayMove(n->GetPosition(), n->GetPosition()+Vector3::NEGATIVE_UNIT_Y*PLAYER_HEIGHT, TRACE_RAY, 0).Fraction < 1.0f) n->bOnGround = true; Index: Changelog =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/Changelog,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Changelog 27 Sep 2004 15:17:28 -0000 1.2 --- Changelog 27 Sep 2004 16:18:40 -0000 1.3 *************** *** 1,34 **** --------------- 27 septembre 2004 - Silver - Krtek --------------- ! * code cleaning (plus de warnings à la compilation) --------------- 26 septembre 2004 - Silver --------------- ! * gestion little/big endian via des classes LittleEndian/BigEndian (fichier endian.h) --------------- 24 septembre 2004 - Silver --------------- ! * update du cvs avec les dernieres sources ! * en vrac, support du bsp, des md5 version 10 (finale) de doom3 --------------- 23 juin 2004 - Silver --------------- ! * ajout d'un TextureManager. Evite qu'il y ait plusieurs fois la même texture chargée en mémoire. De même, si ladite texture ne peut pas être chargée, met une texture blanche à la place ! * debut du projet ! * support des textures au format TGA et BMP ! * support du MD5 (DOOM III) ! * support du dot3 bump-mapping ! * debut du support pour gui --- 1,37 ---- --------------- 27 septembre 2004 --------------- ! Krtek, Silver: ! * code cleaning (plus de warnings à la compilation) ! ! Silver: ! * le moteur physique tente de faire monter les petits obstacles ! (escaliers & autres) --------------- 26 septembre 2004 --------------- ! Silver: ! * gestion little/big endian via des classes LittleEndian/BigEndian (fichier endian.h) --------------- 24 septembre 2004 --------------- ! Silver: ! * update du cvs avec les dernieres sources ! * en vrac, support du bsp, des md5 version 10 (finale) de doom3 --------------- 23 juin 2004 --------------- ! Silver ! * ajout d'un TextureManager. Evite qu'il y ait plusieurs fois la même texture chargée en mémoire. De même, si ladite texture ne peut pas être chargée, met une texture blanche à la place ! * debut du projet ! * support des textures au format TGA et BMP ! * support du MD5 (DOOM III) ! * support du dot3 bump-mapping ! * debut du support pour gui |