[GameEngine] Commit all Kester's changes made to the gameengine to restore 2.25 like physics.

[SCons] Build with Solid as default when enabling the gameengine in the build process
[SCons] Build solid and qhull from the extern directory and link statically against them

That was about it.

There are a few things that needs double checking:

* Makefiles
* Projectfiles
* All the other systems than Linux and Windows on which the build (with scons) has been successfully tested.
This commit is contained in:
Nathan Letwory
2004-03-22 22:02:18 +00:00
parent 5b90aafbd6
commit 00291b5cf4
133 changed files with 9550 additions and 1534 deletions

View File

@@ -1,33 +1,61 @@
/**
* $Id$
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef WIN32
#include "RAS_VAOpenGLRasterizer.h"
#ifdef WIN32
#include <windows.h>
#include "GL/gl.h"
typedef void (APIENTRY *GLLOCKARRAYSEXTPTR)(GLint first,GLsizei count);
typedef void (APIENTRY *GLUNLOCKARRAYSEXTPTR)(void);
void APIENTRY RAS_lockfunc(GLint first,GLsizei count) {};
void APIENTRY RAS_unlockfunc() {};
GLLOCKARRAYSEXTPTR glLockArraysEXT=RAS_lockfunc;
GLUNLOCKARRAYSEXTPTR glUnlockArraysEXT=RAS_unlockfunc;
#endif // WIN32
#ifdef __APPLE__
#include <OpenGL/gl.h>
#else
#include <GL/gl.h>
#endif
#include "STR_String.h"
#include "RAS_TexVert.h"
#include "MT_CmMatrix4x4.h"
#include "RAS_IRenderTools.h" // rendering text
#include "RAS_GLExtensionManager.h"
using namespace RAS_GL;
RAS_VAOpenGLRasterizer::RAS_VAOpenGLRasterizer(RAS_ICanvas* canvas)
:RAS_OpenGLRasterizer(canvas)
{
int i = 0;
}
@@ -38,7 +66,7 @@ RAS_VAOpenGLRasterizer::~RAS_VAOpenGLRasterizer()
bool RAS_VAOpenGLRasterizer::Init()
bool RAS_VAOpenGLRasterizer::Init(void)
{
bool result = RAS_OpenGLRasterizer::Init();
@@ -48,15 +76,7 @@ bool RAS_VAOpenGLRasterizer::Init()
// if possible, add extensions to other platforms too, if this
// rasterizer becomes messy just derive one for each platform
// (ie. KX_Win32Rasterizer, KX_LinuxRasterizer etc.)
glUnlockArraysEXT = reinterpret_cast<GLUNLOCKARRAYSEXTPTR>(wglGetProcAddress("glUnlockArraysEXT"));
if (!glUnlockArraysEXT)
result = false;
glLockArraysEXT = reinterpret_cast<GLLOCKARRAYSEXTPTR>(wglGetProcAddress("glLockArraysEXT"));
if (!glLockArraysEXT)
result=false;
glEnableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_NORMAL_ARRAY);
@@ -149,7 +169,7 @@ void RAS_VAOpenGLRasterizer::IndexPrimitives( const vecVertexArray& vertexarrays
}
}
const RAS_TexVert* vertexarray;
int numindices,vt;
unsigned int numindices, vt;
if (drawmode != GL_LINES)
{
if (useObjectColor)
@@ -177,14 +197,10 @@ void RAS_VAOpenGLRasterizer::IndexPrimitives( const vecVertexArray& vertexarrays
if (!numindices)
break;
mypointer = (unsigned char*)(vertexarray);
glVertexPointer(3,GL_FLOAT,vtxstride,mypointer);
mypointer+= 3*sizeof(float);
glTexCoordPointer(2,GL_FLOAT,vtxstride,mypointer);
mypointer+= 2*sizeof(float);
glColorPointer(4,GL_UNSIGNED_BYTE,vtxstride,mypointer);
mypointer += sizeof(int);
glNormalPointer(GL_SHORT,vtxstride,mypointer);
glVertexPointer(3,GL_FLOAT,vtxstride,vertexarray->getLocalXYZ());
glTexCoordPointer(2,GL_FLOAT,vtxstride,vertexarray->getUV1());
glColorPointer(4,GL_UNSIGNED_BYTE,vtxstride,&vertexarray->getRGBA());
glNormalPointer(GL_SHORT,vtxstride,vertexarray->getNormal());
glLockArraysEXT(0,numverts);
// here the actual drawing takes places
glDrawElements(drawmode,numindices,GL_UNSIGNED_INT,&(indexarray[0]));
@@ -212,5 +228,3 @@ bool RAS_VAOpenGLRasterizer::Stereo()
return false;
}
#endif //WIN32