Fixes for IBM Cell SDK 3.0 by Jochen Roth
This commit is contained in:
@@ -26,13 +26,23 @@ PROGRAM_ppu := CcdPhysicsDemo
|
||||
######################################################################
|
||||
OBJS = CcdPhysicsDemo.o main.o
|
||||
|
||||
CELL_TOP ?= /opt/ibm/cell-sdk/prototype
|
||||
IBM_CELLSDK_VERSION := $(shell if [ -d /opt/cell ]; then echo "3.0"; fi)
|
||||
|
||||
ifeq ("$(IBM_CELLSDK_VERSION)","3.0")
|
||||
CELL_TOP ?= /opt/cell/sdk
|
||||
CELL_SYSROOT = /opt/cell/sysroot
|
||||
include $(CELL_TOP)/buildutils/make.footer
|
||||
else
|
||||
CELL_TOP ?= /opt/ibm/cell-sdk/prototype
|
||||
CELL_SYSROOT = $(CELL_TOP)/sysroot
|
||||
include $(CELL_TOP)/make.footer
|
||||
endif
|
||||
|
||||
########################################################################
|
||||
# Libraries, Include paths, Defines
|
||||
########################################################################
|
||||
INCLUDE = -DUSE_LIBSPE2 \
|
||||
-I$(CELL_TOP)/sysroot/usr/include \
|
||||
-I$(CELL_SYSROOT)/usr/include \
|
||||
-I../ \
|
||||
-I$(ROOT)/src \
|
||||
-I$(ROOT)/Demos/OpenGL \
|
||||
@@ -55,7 +65,6 @@ INSTALL_FILES = $(PROGRAM_ppu)
|
||||
########################################################################
|
||||
|
||||
|
||||
include $(CELL_TOP)/make.footer
|
||||
|
||||
$(PPMS):
|
||||
cp textures/$@ .
|
||||
|
||||
@@ -90,13 +90,9 @@ void BasicDemo::clientMoveAndDisplay()
|
||||
if (ms > minFPS)
|
||||
ms = minFPS;
|
||||
|
||||
printf("step\n");
|
||||
|
||||
if (m_dynamicsWorld)
|
||||
m_dynamicsWorld->stepSimulation(ms / 1000000.f);
|
||||
|
||||
printf("step finished\n");
|
||||
|
||||
renderme();
|
||||
|
||||
glFlush();
|
||||
@@ -175,6 +171,8 @@ void BasicDemo::initPhysics()
|
||||
#else
|
||||
m_dispatcher = new btCollisionDispatcher(collisionConfiguration);
|
||||
#endif //USE_PARALLEL_DISPATCHER
|
||||
m_collisionConfiguration = new btDefaultCollisionConfiguration();
|
||||
|
||||
|
||||
#define USE_SWEEP_AND_PRUNE 1
|
||||
#ifdef USE_SWEEP_AND_PRUNE
|
||||
@@ -200,7 +198,7 @@ void BasicDemo::initPhysics()
|
||||
sol->setSolverMode(btSequentialImpulseConstraintSolver::SOLVER_RANDMIZE_ORDER);
|
||||
m_dynamicsWorld = new btSimpleDynamicsWorld(m_dispatcher,m_overlappingPairCache,m_solver);
|
||||
#else
|
||||
m_dynamicsWorld = new btDiscreteDynamicsWorld(m_dispatcher,m_overlappingPairCache,m_solver);
|
||||
m_dynamicsWorld = new btDiscreteDynamicsWorld(m_dispatcher,m_overlappingPairCache,m_solver,m_collisionConfiguration);
|
||||
#endif //USE_SIMPLE_DYNAMICS_WORLD
|
||||
m_dynamicsWorld->getDispatchInfo().m_enableSPU = true;
|
||||
|
||||
@@ -288,7 +286,7 @@ void BasicDemo::exitPhysics()
|
||||
//delete dispatcher
|
||||
delete m_dispatcher;
|
||||
|
||||
|
||||
delete m_collisionConfiguration;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ class BasicDemo : public DemoApplication
|
||||
btBroadphaseInterface* m_overlappingPairCache;
|
||||
|
||||
btCollisionDispatcher* m_dispatcher;
|
||||
|
||||
btDefaultCollisionConfiguration* m_collisionConfiguration;
|
||||
btConstraintSolver* m_solver;
|
||||
|
||||
btCollisionAlgorithmCreateFunc* m_sphereSphereCF;
|
||||
|
||||
@@ -51,9 +51,17 @@ INSTALL_FILES = $(PROGRAM_ppu)
|
||||
# make.footer
|
||||
########################################################################
|
||||
|
||||
CELL_TOP ?= /opt/ibm/cell-sdk/prototype
|
||||
|
||||
include $(CELL_TOP)/make.footer
|
||||
IBM_CELLSDK_VERSION := $(shell if [ -d /opt/cell ]; then echo "3.0"; fi)
|
||||
|
||||
ifeq ("$(IBM_CELLSDK_VERSION)","3.0")
|
||||
CELL_TOP ?= /opt/cell/sdk
|
||||
include $(CELL_TOP)/buildutils/make.footer
|
||||
else
|
||||
CELL_TOP ?= /opt/ibm/cell-sdk/prototype
|
||||
include $(CELL_TOP)/make.footer
|
||||
endif
|
||||
|
||||
|
||||
$(PPMS):
|
||||
cp textures/$@ .
|
||||
|
||||
@@ -50,9 +50,15 @@ INSTALL_FILES = $(PROGRAM_ppu)
|
||||
# make.footer
|
||||
########################################################################
|
||||
|
||||
CELL_TOP ?= /opt/ibm/cell-sdk/prototype
|
||||
IBM_CELLSDK_VERSION := $(shell if [ -d /opt/cell ]; then echo "3.0"; fi)
|
||||
|
||||
include $(CELL_TOP)/make.footer
|
||||
ifeq ("$(IBM_CELLSDK_VERSION)","3.0")
|
||||
CELL_TOP ?= /opt/cell/sdk
|
||||
include $(CELL_TOP)/buildutils/make.footer
|
||||
else
|
||||
CELL_TOP ?= /opt/ibm/cell-sdk/prototype
|
||||
include $(CELL_TOP)/make.footer
|
||||
endif
|
||||
|
||||
$(PPMS):
|
||||
cp textures/$@ .
|
||||
|
||||
@@ -32,5 +32,13 @@ RenderTexture.o
|
||||
#### Install directories
|
||||
INSTALL_DIR = $(ROOT)/lib/ibmsdk/
|
||||
INSTALL_FILES = $(LIBRARY)
|
||||
CELL_TOP ?= /opt/ibm/cell-sdk/prototype
|
||||
include $(CELL_TOP)/make.footer
|
||||
|
||||
IBM_CELLSDK_VERSION := $(shell if [ -d /opt/cell ]; then echo "3.0"; fi)
|
||||
|
||||
ifeq ("$(IBM_CELLSDK_VERSION)","3.0")
|
||||
CELL_TOP ?= /opt/cell/sdk
|
||||
include $(CELL_TOP)/buildutils/make.footer
|
||||
else
|
||||
CELL_TOP ?= /opt/ibm/cell-sdk/prototype
|
||||
include $(CELL_TOP)/make.footer
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user