mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
Fix PhysX compile issues on Mac
This commit is contained in:
parent
9348cf6b29
commit
f6b66fc5db
@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
#ifndef STDTYPEDEFS_H
|
#ifndef STDTYPEDEFS_H
|
||||||
#define STDTYPEDEFS_H
|
#define STDTYPEDEFS_H
|
||||||
#ifndef __APPLE__
|
|
||||||
typedef unsigned int size_t;
|
typedef unsigned int size_t;
|
||||||
typedef int ssize_t;
|
typedef int ssize_t;
|
||||||
typedef int off_t;
|
typedef int off_t;
|
||||||
@ -30,7 +29,6 @@ struct FILE;
|
|||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
typedef int ptrdiff_t;
|
typedef int ptrdiff_t;
|
||||||
|
|
||||||
typedef unsigned int uint;
|
typedef unsigned int uint;
|
||||||
|
@ -1360,6 +1360,8 @@ def CompileIgate(woutd,wsrc,opts):
|
|||||||
cmd += ' -D_LP64'
|
cmd += ' -D_LP64'
|
||||||
else:
|
else:
|
||||||
cmd += ' -D__i386__'
|
cmd += ' -D__i386__'
|
||||||
|
if GetTarget() == 'darwin':
|
||||||
|
cmd += ' -D__APPLE__'
|
||||||
|
|
||||||
optlevel = GetOptimizeOption(opts)
|
optlevel = GetOptimizeOption(opts)
|
||||||
if (optlevel==1): cmd += ' -D_DEBUG'
|
if (optlevel==1): cmd += ' -D_DEBUG'
|
||||||
|
@ -117,8 +117,7 @@ set_body(PhysxBodyDesc &desc) {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
PhysxBodyDesc PhysxActorDesc::
|
PhysxBodyDesc PhysxActorDesc::
|
||||||
get_body() const {
|
get_body() const {
|
||||||
|
assert(false /* Not implemented */);
|
||||||
throw "Not Implemented";
|
|
||||||
|
|
||||||
//PhysxBodyDesc value;
|
//PhysxBodyDesc value;
|
||||||
//value._desc = *(_desc.body);
|
//value._desc = *(_desc.body);
|
||||||
|
@ -55,6 +55,8 @@ factory(NxControllerType controllerType) {
|
|||||||
case NX_CONTROLLER_CAPSULE:
|
case NX_CONTROLLER_CAPSULE:
|
||||||
return new PhysxCapsuleController();
|
return new PhysxCapsuleController();
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
physx_cat.error() << "Unknown controller type.\n";
|
physx_cat.error() << "Unknown controller type.\n";
|
||||||
|
@ -135,7 +135,7 @@ get_include_shape_group() const {
|
|||||||
unsigned int PhysxForceField::
|
unsigned int PhysxForceField::
|
||||||
get_num_shape_groups() const {
|
get_num_shape_groups() const {
|
||||||
|
|
||||||
nassertr(_error_type == ET_ok, NULL);
|
nassertr(_error_type == ET_ok, 0);
|
||||||
return _ptr->getNbShapeGroups();
|
return _ptr->getNbShapeGroups();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ cook_texcoords(const PhysxClothMeshDesc &meshDesc, const Filename &filename) {
|
|||||||
PhysxConvexMesh *PhysxKitchen::
|
PhysxConvexMesh *PhysxKitchen::
|
||||||
cook_convex_mesh(const PhysxConvexMeshDesc &meshDesc) {
|
cook_convex_mesh(const PhysxConvexMeshDesc &meshDesc) {
|
||||||
|
|
||||||
nassertr_always(meshDesc.is_valid(), false);
|
nassertr_always(meshDesc.is_valid(), NULL);
|
||||||
|
|
||||||
PhysxMemoryWriteBuffer buffer;
|
PhysxMemoryWriteBuffer buffer;
|
||||||
bool status = _cooking->NxCookConvexMesh(meshDesc.get_desc(), buffer);
|
bool status = _cooking->NxCookConvexMesh(meshDesc.get_desc(), buffer);
|
||||||
@ -198,7 +198,7 @@ cook_convex_mesh(const PhysxConvexMeshDesc &meshDesc) {
|
|||||||
PhysxTriangleMesh *PhysxKitchen::
|
PhysxTriangleMesh *PhysxKitchen::
|
||||||
cook_triangle_mesh(const PhysxTriangleMeshDesc &meshDesc) {
|
cook_triangle_mesh(const PhysxTriangleMeshDesc &meshDesc) {
|
||||||
|
|
||||||
nassertr_always(meshDesc.is_valid(), false);
|
nassertr_always(meshDesc.is_valid(), NULL);
|
||||||
|
|
||||||
PhysxMemoryWriteBuffer buffer;
|
PhysxMemoryWriteBuffer buffer;
|
||||||
bool status = _cooking->NxCookTriangleMesh(meshDesc.get_desc(), buffer);
|
bool status = _cooking->NxCookTriangleMesh(meshDesc.get_desc(), buffer);
|
||||||
@ -226,7 +226,7 @@ cook_triangle_mesh(const PhysxTriangleMeshDesc &meshDesc) {
|
|||||||
PhysxClothMesh *PhysxKitchen::
|
PhysxClothMesh *PhysxKitchen::
|
||||||
cook_cloth_mesh(const PhysxClothMeshDesc &meshDesc) {
|
cook_cloth_mesh(const PhysxClothMeshDesc &meshDesc) {
|
||||||
|
|
||||||
nassertr_always(meshDesc.is_valid(), false);
|
nassertr_always(meshDesc.is_valid(), NULL);
|
||||||
|
|
||||||
PhysxMemoryWriteBuffer wbuffer;
|
PhysxMemoryWriteBuffer wbuffer;
|
||||||
bool status = _cooking->NxCookClothMesh(meshDesc.get_desc(), wbuffer);
|
bool status = _cooking->NxCookClothMesh(meshDesc.get_desc(), wbuffer);
|
||||||
@ -255,7 +255,7 @@ cook_cloth_mesh(const PhysxClothMeshDesc &meshDesc) {
|
|||||||
PhysxSoftBodyMesh *PhysxKitchen::
|
PhysxSoftBodyMesh *PhysxKitchen::
|
||||||
cook_soft_body_mesh(const PhysxSoftBodyMeshDesc &meshDesc) {
|
cook_soft_body_mesh(const PhysxSoftBodyMeshDesc &meshDesc) {
|
||||||
|
|
||||||
nassertr_always(meshDesc.is_valid(), false);
|
nassertr_always(meshDesc.is_valid(), NULL);
|
||||||
|
|
||||||
PhysxMemoryWriteBuffer wbuffer;
|
PhysxMemoryWriteBuffer wbuffer;
|
||||||
bool status = _cooking->NxCookSoftBodyMesh(meshDesc.get_desc(), wbuffer);
|
bool status = _cooking->NxCookSoftBodyMesh(meshDesc.get_desc(), wbuffer);
|
||||||
|
@ -309,7 +309,7 @@ void PhysxScene::
|
|||||||
set_timing_variable() {
|
set_timing_variable() {
|
||||||
|
|
||||||
nassertv(_error_type == ET_ok);
|
nassertv(_error_type == ET_ok);
|
||||||
_ptr->setTiming(NULL, NULL, NX_TIMESTEP_VARIABLE);
|
_ptr->setTiming(0, 0, NX_TIMESTEP_VARIABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
@ -97,8 +97,7 @@ set_max_bounds(PhysxBounds3 &bounds) {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
PhysxBounds3 PhysxSceneDesc::
|
PhysxBounds3 PhysxSceneDesc::
|
||||||
get_max_bounds() const {
|
get_max_bounds() const {
|
||||||
|
assert(false /* Not implemented */);
|
||||||
throw "Not Implemented";
|
|
||||||
|
|
||||||
//PhysxBounds3 value;
|
//PhysxBounds3 value;
|
||||||
//value._bounds = *(_desc.maxBounds);
|
//value._bounds = *(_desc.maxBounds);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user