瀏覽代碼

- Updating bullet
- Fixing LLVM build

Panagiotis Christopoulos Charitos 14 年之前
父節點
當前提交
831713e0b8
共有 100 個文件被更改,包括 816 次插入600 次删除
  1. 3 2
      build/release_llvm/Makefile
  2. 3 2
      build/release_llvm/gen.cfg.py
  3. 5 3
      extern/do-externs.sh
  4. 141 205
      extern/include/GL/glew.h
  5. 5 36
      extern/include/GL/glxew.h
  6. 0 33
      extern/include/GL/wglew.h
  7. 4 4
      extern/include/bullet/Bullet-C-Api.h
  8. 2 2
      extern/include/bullet/BulletCollision/BroadphaseCollision/btAxisSweep3.h
  9. 3 3
      extern/include/bullet/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h
  10. 3 3
      extern/include/bullet/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h
  11. 5 5
      extern/include/bullet/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h
  12. 8 8
      extern/include/bullet/BulletCollision/BroadphaseCollision/btDbvt.h
  13. 9 5
      extern/include/bullet/BulletCollision/BroadphaseCollision/btDispatcher.h
  14. 3 3
      extern/include/bullet/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h
  15. 3 3
      extern/include/bullet/BulletCollision/BroadphaseCollision/btQuantizedBvh.h
  16. 3 3
      extern/include/bullet/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h
  17. 3 3
      extern/include/bullet/BulletCollision/CollisionDispatch/SphereTriangleDetector.h
  18. 3 3
      extern/include/bullet/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h
  19. 3 3
      extern/include/bullet/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h
  20. 2 2
      extern/include/bullet/BulletCollision/CollisionDispatch/btBoxBoxDetector.h
  21. 1 0
      extern/include/bullet/BulletCollision/CollisionDispatch/btCollisionConfiguration.h
  22. 3 3
      extern/include/bullet/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h
  23. 20 7
      extern/include/bullet/BulletCollision/CollisionDispatch/btCollisionDispatcher.h
  24. 3 3
      extern/include/bullet/BulletCollision/CollisionDispatch/btCollisionObject.h
  25. 42 3
      extern/include/bullet/BulletCollision/CollisionDispatch/btCollisionWorld.h
  26. 3 3
      extern/include/bullet/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h
  27. 3 3
      extern/include/bullet/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h
  28. 3 3
      extern/include/bullet/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h
  29. 3 3
      extern/include/bullet/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h
  30. 3 3
      extern/include/bullet/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h
  31. 3 3
      extern/include/bullet/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h
  32. 3 3
      extern/include/bullet/BulletCollision/CollisionDispatch/btManifoldResult.h
  33. 3 3
      extern/include/bullet/BulletCollision/CollisionDispatch/btSimulationIslandManager.h
  34. 3 3
      extern/include/bullet/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h
  35. 3 3
      extern/include/bullet/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h
  36. 3 3
      extern/include/bullet/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h
  37. 3 3
      extern/include/bullet/BulletCollision/CollisionDispatch/btUnionFind.h
  38. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btBox2dShape.h
  39. 4 4
      extern/include/bullet/BulletCollision/CollisionShapes/btBoxShape.h
  40. 4 4
      extern/include/bullet/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h
  41. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btCollisionMargin.h
  42. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btCollisionShape.h
  43. 10 6
      extern/include/bullet/BulletCollision/CollisionShapes/btCompoundShape.h
  44. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btConcaveShape.h
  45. 6 3
      extern/include/bullet/BulletCollision/CollisionShapes/btConeShape.h
  46. 1 1
      extern/include/bullet/BulletCollision/CollisionShapes/btConvex2dShape.h
  47. 5 3
      extern/include/bullet/BulletCollision/CollisionShapes/btConvexHullShape.h
  48. 62 0
      extern/include/bullet/BulletCollision/CollisionShapes/btConvexPolyhedron.h
  49. 5 3
      extern/include/bullet/BulletCollision/CollisionShapes/btConvexShape.h
  50. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h
  51. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btCylinderShape.h
  52. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btEmptyShape.h
  53. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h
  54. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btMaterial.h
  55. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btMinkowskiSumShape.h
  56. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btMultiSphereShape.h
  57. 3 4
      extern/include/bullet/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h
  58. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btOptimizedBvh.h
  59. 17 3
      extern/include/bullet/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h
  60. 34 3
      extern/include/bullet/BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h
  61. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btShapeHull.h
  62. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btSphereShape.h
  63. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btStaticPlaneShape.h
  64. 11 3
      extern/include/bullet/BulletCollision/CollisionShapes/btStridingMeshInterface.h
  65. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btTetrahedronShape.h
  66. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btTriangleCallback.h
  67. 2 0
      extern/include/bullet/BulletCollision/CollisionShapes/btTriangleInfoMap.h
  68. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btTriangleMesh.h
  69. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btTriangleMeshShape.h
  70. 3 3
      extern/include/bullet/BulletCollision/CollisionShapes/btTriangleShape.h
  71. 2 2
      extern/include/bullet/BulletCollision/Gimpact/btGImpactBvh.h
  72. 5 5
      extern/include/bullet/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h
  73. 2 2
      extern/include/bullet/BulletCollision/Gimpact/btGImpactQuantizedBvh.h
  74. 3 3
      extern/include/bullet/BulletCollision/Gimpact/btQuantization.h
  75. 3 3
      extern/include/bullet/BulletCollision/Gimpact/btTriangleShapeEx.h
  76. 11 4
      extern/include/bullet/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h
  77. 4 4
      extern/include/bullet/BulletCollision/NarrowPhaseCollision/btConvexCast.h
  78. 3 3
      extern/include/bullet/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h
  79. 5 3
      extern/include/bullet/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h
  80. 3 3
      extern/include/bullet/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h
  81. 5 3
      extern/include/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpa2.h
  82. 3 3
      extern/include/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h
  83. 22 17
      extern/include/bullet/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h
  84. 3 3
      extern/include/bullet/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h
  85. 21 16
      extern/include/bullet/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h
  86. 3 3
      extern/include/bullet/BulletCollision/NarrowPhaseCollision/btPointCollector.h
  87. 46 0
      extern/include/bullet/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.h
  88. 5 4
      extern/include/bullet/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h
  89. 3 3
      extern/include/bullet/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h
  90. 3 3
      extern/include/bullet/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h
  91. 4 3
      extern/include/bullet/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h
  92. 1 0
      extern/include/bullet/BulletCollision/btBulletCollisionCommon.h
  93. 4 3
      extern/include/bullet/BulletDynamics/Character/btCharacterControllerInterface.h
  94. 3 3
      extern/include/bullet/BulletDynamics/Character/btKinematicCharacterController.h
  95. 18 4
      extern/include/bullet/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h
  96. 3 3
      extern/include/bullet/BulletDynamics/ConstraintSolver/btConstraintSolver.h
  97. 6 3
      extern/include/bullet/BulletDynamics/ConstraintSolver/btContactConstraint.h
  98. 4 4
      extern/include/bullet/BulletDynamics/ConstraintSolver/btContactSolverInfo.h
  99. 33 7
      extern/include/bullet/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h
  100. 45 3
      extern/include/bullet/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h

文件差異過大導致無法顯示
+ 3 - 2
build/release_llvm/Makefile


+ 3 - 2
build/release_llvm/gen.cfg.py

@@ -8,7 +8,8 @@ includePaths.extend(["../../extern/include", "../../extern/include/bullet", "/us
 executableName = "anki"
 executableName = "anki"
 
 
 compiler = "clang++"
 compiler = "clang++"
+linker = "llvm-ld"
 
 
-compilerFlags = "-DPLATFORM_LINUX -DMATH_INTEL_SIMD -DNDEBUG -DBOOST_DISABLE_ASSERTS -DREVISION=\\\"`svnversion ../..`\\\" -c -pedantic-errors -pedantic -ansi -Wall -Wextra -W -Wno-long-long -pipe -msse4 -O3 -mtune=core2 -ffast-math"
+compilerFlags = "-DPLATFORM_LINUX -DMATH_INTEL_SIMD -DNDEBUG -DBOOST_DISABLE_ASSERTS -DREVISION=\\\"`svnversion ../..`\\\" -c -pedantic-errors -pedantic -ansi -Wall -Wextra -W -Wno-long-long -pipe -msse4 -O3 -mtune=core2 -ffast-math -emit-llvm"
 
 
-linkerFlags = "-rdynamic -flto -L../../extern/lib-x86-64-linux -Wl,-Bstatic -lBulletSoftBody -lBulletDynamics -lBulletCollision -lLinearMath -lGLEW -lGLU -Wl,-Bdynamic -lGL -ljpeg -lSDL -lpng -lpython2.6 -lboost_system -lboost_python -lboost_filesystem -lboost_thread -lfreetype"
+linkerFlags = "-L../../extern/lib-x86-64-linux -lBulletSoftBody -lBulletDynamics -lBulletCollision -lLinearMath -lGLEW -lGLU -lGL -ljpeg -lSDL -lpng -lpython2.6 -lboost_system -lboost_python -lboost_filesystem -lboost_thread -lfreetype"

+ 5 - 3
extern/do-externs.sh

@@ -6,12 +6,14 @@ EXTERN_DIR=$PWD
 
 
 cd ../../bullet
 cd ../../bullet
 svn update
 svn update
-#rm CMakeCache.txt
-cmake -G "Unix Makefiles" -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_EXTRAS=OFF -DBUILD_DEMOS=OFF -DCMAKE_INSTALL_PREFIX=$PWD/install -DEXECUTABLE_OUTPUT_PATH=$PWD/install -DINCLUDE_INSTALL_DIR=$PWD/install -DLIBRARY_OUTPUT_PATH=$PWD/install -DLIB_DESTINATION=$PWD/install -DPKGCONFIG_INSTALL_PREFIX=$PWD/install
+rm CMakeCache.txt
+rm -rf CMakeFiles
+rm -rf install
+cmake -G "Unix Makefiles" -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_EXTRAS=OFF -DBUILD_DEMOS=OFF -DCMAKE_INSTALL_PREFIX=$PWD/install
 nice make -j `cat /proc/cpuinfo | grep processor | wc -l`
 nice make -j `cat /proc/cpuinfo | grep processor | wc -l`
 make install
 make install
 cd $EXTERN_DIR
 cd $EXTERN_DIR
-rsync -avuzb --exclude .svn ../../bullet/install/include/* include/bullet
+rsync -avuzb --exclude .svn ../../bullet/install/include/bullet/* include/bullet
 rsync -avuzb --exclude .svn ../../bullet/install/lib/* lib-x86-64-linux
 rsync -avuzb --exclude .svn ../../bullet/install/lib/* lib-x86-64-linux
 
 
 cd ../../SDL
 cd ../../SDL

+ 141 - 205
extern/include/GL/glew.h

@@ -172,10 +172,9 @@ typedef _W64 int ptrdiff_t;
 #endif
 #endif
 
 
 /*
 /*
- * GLEW_STATIC is defined for static library.
- * GLEW_BUILD  is defined for building the DLL library.
+ * GLEW_STATIC needs to be set when using the static version.
+ * GLEW_BUILD is set when building the DLL version.
  */
  */
-
 #ifdef GLEW_STATIC
 #ifdef GLEW_STATIC
 #  define GLEWAPI extern
 #  define GLEWAPI extern
 #else
 #else
@@ -209,22 +208,7 @@ typedef _W64 int ptrdiff_t;
 
 
 #define GLEW_APIENTRY_DEFINED
 #define GLEW_APIENTRY_DEFINED
 #define APIENTRY
 #define APIENTRY
-
-/*
- * GLEW_STATIC is defined for static library.
- */
-
-#ifdef GLEW_STATIC
-#  define GLEWAPI extern
-#else
-#  if defined(__GNUC__) && __GNUC__>=4
-#   define GLEWAPI extern __attribute__ ((visibility("default")))
-#  elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-#   define GLEWAPI extern __global
-#  else
-#   define GLEWAPI extern
-#  endif
-#endif
+#define GLEWAPI extern
 
 
 /* <glu.h> */
 /* <glu.h> */
 #ifndef GLAPI
 #ifndef GLAPI
@@ -279,43 +263,34 @@ typedef GLuint64EXT GLuint64;
 typedef struct __GLsync *GLsync;
 typedef struct __GLsync *GLsync;
 
 
 typedef char GLchar;
 typedef char GLchar;
+typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,
+                                        GLenum category,
+                                        GLenum severity,
+                                        GLsizei length,
+                                        const GLchar* message,
+                                        GLvoid* userParam);
+
+/* For ARB_debug_output */
+
+typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,
+                                        GLenum type,
+                                        GLuint id,
+                                        GLenum severity,
+                                        GLsizei length,
+                                        const GLchar* message,
+                                        GLvoid* userParam);
+
+/* For GL_ARB_cl_event */
+
+typedef struct _cl_context *cl_context;
+typedef struct _cl_event *cl_event;
 
 
-#define GL_ZERO 0
-#define GL_FALSE 0
-#define GL_LOGIC_OP 0x0BF1
-#define GL_NONE 0
-#define GL_TEXTURE_COMPONENTS 0x1003
-#define GL_NO_ERROR 0
-#define GL_POINTS 0x0000
-#define GL_CURRENT_BIT 0x00000001
-#define GL_TRUE 1
-#define GL_ONE 1
-#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
-#define GL_LINES 0x0001
-#define GL_LINE_LOOP 0x0002
-#define GL_POINT_BIT 0x00000002
-#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
-#define GL_LINE_STRIP 0x0003
-#define GL_LINE_BIT 0x00000004
-#define GL_TRIANGLES 0x0004
-#define GL_TRIANGLE_STRIP 0x0005
-#define GL_TRIANGLE_FAN 0x0006
-#define GL_QUADS 0x0007
-#define GL_QUAD_STRIP 0x0008
-#define GL_POLYGON_BIT 0x00000008
-#define GL_POLYGON 0x0009
-#define GL_POLYGON_STIPPLE_BIT 0x00000010
-#define GL_PIXEL_MODE_BIT 0x00000020
-#define GL_LIGHTING_BIT 0x00000040
-#define GL_FOG_BIT 0x00000080
-#define GL_DEPTH_BUFFER_BIT 0x00000100
 #define GL_ACCUM 0x0100
 #define GL_ACCUM 0x0100
 #define GL_LOAD 0x0101
 #define GL_LOAD 0x0101
 #define GL_RETURN 0x0102
 #define GL_RETURN 0x0102
 #define GL_MULT 0x0103
 #define GL_MULT 0x0103
 #define GL_ADD 0x0104
 #define GL_ADD 0x0104
 #define GL_NEVER 0x0200
 #define GL_NEVER 0x0200
-#define GL_ACCUM_BUFFER_BIT 0x00000200
 #define GL_LESS 0x0201
 #define GL_LESS 0x0201
 #define GL_EQUAL 0x0202
 #define GL_EQUAL 0x0202
 #define GL_LEQUAL 0x0203
 #define GL_LEQUAL 0x0203
@@ -323,6 +298,39 @@ typedef char GLchar;
 #define GL_NOTEQUAL 0x0205
 #define GL_NOTEQUAL 0x0205
 #define GL_GEQUAL 0x0206
 #define GL_GEQUAL 0x0206
 #define GL_ALWAYS 0x0207
 #define GL_ALWAYS 0x0207
+#define GL_CURRENT_BIT 0x00000001
+#define GL_POINT_BIT 0x00000002
+#define GL_LINE_BIT 0x00000004
+#define GL_POLYGON_BIT 0x00000008
+#define GL_POLYGON_STIPPLE_BIT 0x00000010
+#define GL_PIXEL_MODE_BIT 0x00000020
+#define GL_LIGHTING_BIT 0x00000040
+#define GL_FOG_BIT 0x00000080
+#define GL_DEPTH_BUFFER_BIT 0x00000100
+#define GL_ACCUM_BUFFER_BIT 0x00000200
+#define GL_STENCIL_BUFFER_BIT 0x00000400
+#define GL_VIEWPORT_BIT 0x00000800
+#define GL_TRANSFORM_BIT 0x00001000
+#define GL_ENABLE_BIT 0x00002000
+#define GL_COLOR_BUFFER_BIT 0x00004000
+#define GL_HINT_BIT 0x00008000
+#define GL_EVAL_BIT 0x00010000
+#define GL_LIST_BIT 0x00020000
+#define GL_TEXTURE_BIT 0x00040000
+#define GL_SCISSOR_BIT 0x00080000
+#define GL_ALL_ATTRIB_BITS 0x000fffff
+#define GL_POINTS 0x0000
+#define GL_LINES 0x0001
+#define GL_LINE_LOOP 0x0002
+#define GL_LINE_STRIP 0x0003
+#define GL_TRIANGLES 0x0004
+#define GL_TRIANGLE_STRIP 0x0005
+#define GL_TRIANGLE_FAN 0x0006
+#define GL_QUADS 0x0007
+#define GL_QUAD_STRIP 0x0008
+#define GL_POLYGON 0x0009
+#define GL_ZERO 0
+#define GL_ONE 1
 #define GL_SRC_COLOR 0x0300
 #define GL_SRC_COLOR 0x0300
 #define GL_ONE_MINUS_SRC_COLOR 0x0301
 #define GL_ONE_MINUS_SRC_COLOR 0x0301
 #define GL_SRC_ALPHA 0x0302
 #define GL_SRC_ALPHA 0x0302
@@ -332,7 +340,26 @@ typedef char GLchar;
 #define GL_DST_COLOR 0x0306
 #define GL_DST_COLOR 0x0306
 #define GL_ONE_MINUS_DST_COLOR 0x0307
 #define GL_ONE_MINUS_DST_COLOR 0x0307
 #define GL_SRC_ALPHA_SATURATE 0x0308
 #define GL_SRC_ALPHA_SATURATE 0x0308
-#define GL_STENCIL_BUFFER_BIT 0x00000400
+#define GL_TRUE 1
+#define GL_FALSE 0
+#define GL_CLIP_PLANE0 0x3000
+#define GL_CLIP_PLANE1 0x3001
+#define GL_CLIP_PLANE2 0x3002
+#define GL_CLIP_PLANE3 0x3003
+#define GL_CLIP_PLANE4 0x3004
+#define GL_CLIP_PLANE5 0x3005
+#define GL_BYTE 0x1400
+#define GL_UNSIGNED_BYTE 0x1401
+#define GL_SHORT 0x1402
+#define GL_UNSIGNED_SHORT 0x1403
+#define GL_INT 0x1404
+#define GL_UNSIGNED_INT 0x1405
+#define GL_FLOAT 0x1406
+#define GL_2_BYTES 0x1407
+#define GL_3_BYTES 0x1408
+#define GL_4_BYTES 0x1409
+#define GL_DOUBLE 0x140A
+#define GL_NONE 0
 #define GL_FRONT_LEFT 0x0400
 #define GL_FRONT_LEFT 0x0400
 #define GL_FRONT_RIGHT 0x0401
 #define GL_FRONT_RIGHT 0x0401
 #define GL_BACK_LEFT 0x0402
 #define GL_BACK_LEFT 0x0402
@@ -346,6 +373,7 @@ typedef char GLchar;
 #define GL_AUX1 0x040A
 #define GL_AUX1 0x040A
 #define GL_AUX2 0x040B
 #define GL_AUX2 0x040B
 #define GL_AUX3 0x040C
 #define GL_AUX3 0x040C
+#define GL_NO_ERROR 0
 #define GL_INVALID_ENUM 0x0500
 #define GL_INVALID_ENUM 0x0500
 #define GL_INVALID_VALUE 0x0501
 #define GL_INVALID_VALUE 0x0501
 #define GL_INVALID_OPERATION 0x0502
 #define GL_INVALID_OPERATION 0x0502
@@ -366,7 +394,6 @@ typedef char GLchar;
 #define GL_COPY_PIXEL_TOKEN 0x0706
 #define GL_COPY_PIXEL_TOKEN 0x0706
 #define GL_LINE_RESET_TOKEN 0x0707
 #define GL_LINE_RESET_TOKEN 0x0707
 #define GL_EXP 0x0800
 #define GL_EXP 0x0800
-#define GL_VIEWPORT_BIT 0x00000800
 #define GL_EXP2 0x0801
 #define GL_EXP2 0x0801
 #define GL_CW 0x0900
 #define GL_CW 0x0900
 #define GL_CCW 0x0901
 #define GL_CCW 0x0901
@@ -583,7 +610,6 @@ typedef char GLchar;
 #define GL_SELECTION_BUFFER_POINTER 0x0DF3
 #define GL_SELECTION_BUFFER_POINTER 0x0DF3
 #define GL_SELECTION_BUFFER_SIZE 0x0DF4
 #define GL_SELECTION_BUFFER_SIZE 0x0DF4
 #define GL_TEXTURE_WIDTH 0x1000
 #define GL_TEXTURE_WIDTH 0x1000
-#define GL_TRANSFORM_BIT 0x00001000
 #define GL_TEXTURE_HEIGHT 0x1001
 #define GL_TEXTURE_HEIGHT 0x1001
 #define GL_TEXTURE_INTERNAL_FORMAT 0x1003
 #define GL_TEXTURE_INTERNAL_FORMAT 0x1003
 #define GL_TEXTURE_BORDER_COLOR 0x1004
 #define GL_TEXTURE_BORDER_COLOR 0x1004
@@ -591,6 +617,14 @@ typedef char GLchar;
 #define GL_DONT_CARE 0x1100
 #define GL_DONT_CARE 0x1100
 #define GL_FASTEST 0x1101
 #define GL_FASTEST 0x1101
 #define GL_NICEST 0x1102
 #define GL_NICEST 0x1102
+#define GL_LIGHT0 0x4000
+#define GL_LIGHT1 0x4001
+#define GL_LIGHT2 0x4002
+#define GL_LIGHT3 0x4003
+#define GL_LIGHT4 0x4004
+#define GL_LIGHT5 0x4005
+#define GL_LIGHT6 0x4006
+#define GL_LIGHT7 0x4007
 #define GL_AMBIENT 0x1200
 #define GL_AMBIENT 0x1200
 #define GL_DIFFUSE 0x1201
 #define GL_DIFFUSE 0x1201
 #define GL_SPECULAR 0x1202
 #define GL_SPECULAR 0x1202
@@ -603,17 +637,6 @@ typedef char GLchar;
 #define GL_QUADRATIC_ATTENUATION 0x1209
 #define GL_QUADRATIC_ATTENUATION 0x1209
 #define GL_COMPILE 0x1300
 #define GL_COMPILE 0x1300
 #define GL_COMPILE_AND_EXECUTE 0x1301
 #define GL_COMPILE_AND_EXECUTE 0x1301
-#define GL_BYTE 0x1400
-#define GL_UNSIGNED_BYTE 0x1401
-#define GL_SHORT 0x1402
-#define GL_UNSIGNED_SHORT 0x1403
-#define GL_INT 0x1404
-#define GL_UNSIGNED_INT 0x1405
-#define GL_FLOAT 0x1406
-#define GL_2_BYTES 0x1407
-#define GL_3_BYTES 0x1408
-#define GL_4_BYTES 0x1409
-#define GL_DOUBLE 0x140A
 #define GL_CLEAR 0x1500
 #define GL_CLEAR 0x1500
 #define GL_AND 0x1501
 #define GL_AND 0x1501
 #define GL_AND_REVERSE 0x1502
 #define GL_AND_REVERSE 0x1502
@@ -669,7 +692,6 @@ typedef char GLchar;
 #define GL_VERSION 0x1F02
 #define GL_VERSION 0x1F02
 #define GL_EXTENSIONS 0x1F03
 #define GL_EXTENSIONS 0x1F03
 #define GL_S 0x2000
 #define GL_S 0x2000
-#define GL_ENABLE_BIT 0x00002000
 #define GL_T 0x2001
 #define GL_T 0x2001
 #define GL_R 0x2002
 #define GL_R 0x2002
 #define GL_Q 0x2003
 #define GL_Q 0x2003
@@ -696,42 +718,14 @@ typedef char GLchar;
 #define GL_TEXTURE_WRAP_T 0x2803
 #define GL_TEXTURE_WRAP_T 0x2803
 #define GL_CLAMP 0x2900
 #define GL_CLAMP 0x2900
 #define GL_REPEAT 0x2901
 #define GL_REPEAT 0x2901
+#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
+#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
+#define GL_CLIENT_ALL_ATTRIB_BITS 0xffffffff
+#define GL_POLYGON_OFFSET_FACTOR 0x8038
 #define GL_POLYGON_OFFSET_UNITS 0x2A00
 #define GL_POLYGON_OFFSET_UNITS 0x2A00
 #define GL_POLYGON_OFFSET_POINT 0x2A01
 #define GL_POLYGON_OFFSET_POINT 0x2A01
 #define GL_POLYGON_OFFSET_LINE 0x2A02
 #define GL_POLYGON_OFFSET_LINE 0x2A02
-#define GL_R3_G3_B2 0x2A10
-#define GL_V2F 0x2A20
-#define GL_V3F 0x2A21
-#define GL_C4UB_V2F 0x2A22
-#define GL_C4UB_V3F 0x2A23
-#define GL_C3F_V3F 0x2A24
-#define GL_N3F_V3F 0x2A25
-#define GL_C4F_N3F_V3F 0x2A26
-#define GL_T2F_V3F 0x2A27
-#define GL_T4F_V4F 0x2A28
-#define GL_T2F_C4UB_V3F 0x2A29
-#define GL_T2F_C3F_V3F 0x2A2A
-#define GL_T2F_N3F_V3F 0x2A2B
-#define GL_T2F_C4F_N3F_V3F 0x2A2C
-#define GL_T4F_C4F_N3F_V4F 0x2A2D
-#define GL_CLIP_PLANE0 0x3000
-#define GL_CLIP_PLANE1 0x3001
-#define GL_CLIP_PLANE2 0x3002
-#define GL_CLIP_PLANE3 0x3003
-#define GL_CLIP_PLANE4 0x3004
-#define GL_CLIP_PLANE5 0x3005
-#define GL_LIGHT0 0x4000
-#define GL_COLOR_BUFFER_BIT 0x00004000
-#define GL_LIGHT1 0x4001
-#define GL_LIGHT2 0x4002
-#define GL_LIGHT3 0x4003
-#define GL_LIGHT4 0x4004
-#define GL_LIGHT5 0x4005
-#define GL_LIGHT6 0x4006
-#define GL_LIGHT7 0x4007
-#define GL_HINT_BIT 0x00008000
 #define GL_POLYGON_OFFSET_FILL 0x8037
 #define GL_POLYGON_OFFSET_FILL 0x8037
-#define GL_POLYGON_OFFSET_FACTOR 0x8038
 #define GL_ALPHA4 0x803B
 #define GL_ALPHA4 0x803B
 #define GL_ALPHA8 0x803C
 #define GL_ALPHA8 0x803C
 #define GL_ALPHA12 0x803D
 #define GL_ALPHA12 0x803D
@@ -751,6 +745,7 @@ typedef char GLchar;
 #define GL_INTENSITY8 0x804B
 #define GL_INTENSITY8 0x804B
 #define GL_INTENSITY12 0x804C
 #define GL_INTENSITY12 0x804C
 #define GL_INTENSITY16 0x804D
 #define GL_INTENSITY16 0x804D
+#define GL_R3_G3_B2 0x2A10
 #define GL_RGB4 0x804F
 #define GL_RGB4 0x804F
 #define GL_RGB5 0x8050
 #define GL_RGB5 0x8050
 #define GL_RGB8 0x8051
 #define GL_RGB8 0x8051
@@ -802,18 +797,28 @@ typedef char GLchar;
 #define GL_INDEX_ARRAY_POINTER 0x8091
 #define GL_INDEX_ARRAY_POINTER 0x8091
 #define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
 #define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
 #define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
 #define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
+#define GL_V2F 0x2A20
+#define GL_V3F 0x2A21
+#define GL_C4UB_V2F 0x2A22
+#define GL_C4UB_V3F 0x2A23
+#define GL_C3F_V3F 0x2A24
+#define GL_N3F_V3F 0x2A25
+#define GL_C4F_N3F_V3F 0x2A26
+#define GL_T2F_V3F 0x2A27
+#define GL_T4F_V4F 0x2A28
+#define GL_T2F_C4UB_V3F 0x2A29
+#define GL_T2F_C3F_V3F 0x2A2A
+#define GL_T2F_N3F_V3F 0x2A2B
+#define GL_T2F_C4F_N3F_V3F 0x2A2C
+#define GL_T4F_C4F_N3F_V4F 0x2A2D
+#define GL_LOGIC_OP GL_INDEX_LOGIC_OP
+#define GL_TEXTURE_COMPONENTS GL_TEXTURE_INTERNAL_FORMAT
 #define GL_COLOR_INDEX1_EXT 0x80E2
 #define GL_COLOR_INDEX1_EXT 0x80E2
 #define GL_COLOR_INDEX2_EXT 0x80E3
 #define GL_COLOR_INDEX2_EXT 0x80E3
 #define GL_COLOR_INDEX4_EXT 0x80E4
 #define GL_COLOR_INDEX4_EXT 0x80E4
 #define GL_COLOR_INDEX8_EXT 0x80E5
 #define GL_COLOR_INDEX8_EXT 0x80E5
 #define GL_COLOR_INDEX12_EXT 0x80E6
 #define GL_COLOR_INDEX12_EXT 0x80E6
 #define GL_COLOR_INDEX16_EXT 0x80E7
 #define GL_COLOR_INDEX16_EXT 0x80E7
-#define GL_EVAL_BIT 0x00010000
-#define GL_LIST_BIT 0x00020000
-#define GL_TEXTURE_BIT 0x00040000
-#define GL_SCISSOR_BIT 0x00080000
-#define GL_ALL_ATTRIB_BITS 0x000fffff
-#define GL_CLIENT_ALL_ATTRIB_BITS 0xffffffff
 
 
 GLAPI void GLAPIENTRY glAccum (GLenum op, GLfloat value);
 GLAPI void GLAPIENTRY glAccum (GLenum op, GLfloat value);
 GLAPI void GLAPIENTRY glAlphaFunc (GLenum func, GLclampf ref);
 GLAPI void GLAPIENTRY glAlphaFunc (GLenum func, GLclampf ref);
@@ -1158,13 +1163,11 @@ GLAPI void GLAPIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei heigh
 
 
 /* ---------------------------------- GLU ---------------------------------- */
 /* ---------------------------------- GLU ---------------------------------- */
 
 
-#ifndef GLEW_NO_GLU
 /* this is where we can safely include GLU */
 /* this is where we can safely include GLU */
-#  if defined(__APPLE__) && defined(__MACH__)
-#    include <OpenGL/glu.h>
-#  else
-#    include <GL/glu.h>
-#  endif
+#if defined(__APPLE__) && defined(__MACH__)
+#include <OpenGL/glu.h>
+#else
+#include <GL/glu.h>
 #endif
 #endif
 
 
 /* ----------------------------- GL_VERSION_1_2 ---------------------------- */
 /* ----------------------------- GL_VERSION_1_2 ---------------------------- */
@@ -1512,7 +1515,7 @@ typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green
 typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
 typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
 typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
 typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
 typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
 typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
-typedef void (GLAPIENTRY * PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer);
 typedef void (GLAPIENTRY * PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
 typedef void (GLAPIENTRY * PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
 typedef void (GLAPIENTRY * PFNGLWINDOWPOS2DVPROC) (const GLdouble *p);
 typedef void (GLAPIENTRY * PFNGLWINDOWPOS2DVPROC) (const GLdouble *p);
 typedef void (GLAPIENTRY * PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
 typedef void (GLAPIENTRY * PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
@@ -1638,8 +1641,8 @@ typedef void (GLAPIENTRY * PFNGLWINDOWPOS3SVPROC) (const GLshort *p);
 #define GL_DYNAMIC_COPY 0x88EA
 #define GL_DYNAMIC_COPY 0x88EA
 #define GL_SAMPLES_PASSED 0x8914
 #define GL_SAMPLES_PASSED 0x8914
 
 
-typedef ptrdiff_t GLintptr;
 typedef ptrdiff_t GLsizeiptr;
 typedef ptrdiff_t GLsizeiptr;
+typedef ptrdiff_t GLintptr;
 
 
 typedef void (GLAPIENTRY * PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
 typedef void (GLAPIENTRY * PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
 typedef void (GLAPIENTRY * PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
 typedef void (GLAPIENTRY * PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
@@ -1794,12 +1797,12 @@ typedef GLint (GLAPIENTRY * PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const G
 typedef void (GLAPIENTRY * PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei* length, GLchar* infoLog);
 typedef void (GLAPIENTRY * PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei* length, GLchar* infoLog);
 typedef void (GLAPIENTRY * PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint* param);
 typedef void (GLAPIENTRY * PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint* param);
 typedef void (GLAPIENTRY * PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* infoLog);
 typedef void (GLAPIENTRY * PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* infoLog);
-typedef void (GLAPIENTRY * PFNGLGETSHADERSOURCEPROC) (GLuint obj, GLsizei maxLength, GLsizei* length, GLchar* source);
+typedef void (GLAPIENTRY * PFNGLGETSHADERSOURCEPROC) (GLint obj, GLsizei maxLength, GLsizei* length, GLchar* source);
 typedef void (GLAPIENTRY * PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint* param);
 typedef void (GLAPIENTRY * PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint* param);
 typedef GLint (GLAPIENTRY * PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar* name);
 typedef GLint (GLAPIENTRY * PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar* name);
 typedef void (GLAPIENTRY * PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat* params);
 typedef void (GLAPIENTRY * PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat* params);
 typedef void (GLAPIENTRY * PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint* params);
 typedef void (GLAPIENTRY * PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint* params);
-typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint, GLenum, GLvoid**);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint, GLenum, GLvoid*);
 typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBDVPROC) (GLuint, GLenum, GLdouble*);
 typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBDVPROC) (GLuint, GLenum, GLdouble*);
 typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBFVPROC) (GLuint, GLenum, GLfloat*);
 typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBFVPROC) (GLuint, GLenum, GLfloat*);
 typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBIVPROC) (GLuint, GLenum, GLint*);
 typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBIVPROC) (GLuint, GLenum, GLint*);
@@ -2146,7 +2149,7 @@ typedef GLint (GLAPIENTRY * PFNGLGETFRAGDATALOCATIONPROC) (GLuint, const GLchar*
 typedef const GLubyte* (GLAPIENTRY * PFNGLGETSTRINGIPROC) (GLenum, GLuint);
 typedef const GLubyte* (GLAPIENTRY * PFNGLGETSTRINGIPROC) (GLenum, GLuint);
 typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERIIVPROC) (GLenum, GLenum, GLint*);
 typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERIIVPROC) (GLenum, GLenum, GLint*);
 typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERIUIVPROC) (GLenum, GLenum, GLuint*);
 typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERIUIVPROC) (GLenum, GLenum, GLuint*);
-typedef void (GLAPIENTRY * PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
+typedef void (GLAPIENTRY * PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint, GLuint, GLint*);
 typedef void (GLAPIENTRY * PFNGLGETUNIFORMUIVPROC) (GLuint, GLint, GLuint*);
 typedef void (GLAPIENTRY * PFNGLGETUNIFORMUIVPROC) (GLuint, GLint, GLuint*);
 typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBIIVPROC) (GLuint, GLenum, GLint*);
 typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBIIVPROC) (GLuint, GLenum, GLint*);
 typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint, GLenum, GLuint*);
 typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint, GLenum, GLuint*);
@@ -2488,8 +2491,6 @@ typedef void (GLAPIENTRY * PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
 #define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F
 #define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F
 #define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150
 #define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150
 
 
-typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id, GLenum category, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam);
-
 typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, void* userParam);
 typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, void* userParam);
 typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled);
 typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled);
 typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const char* buf);
 typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const char* buf);
@@ -2535,6 +2536,21 @@ typedef void (GLAPIENTRY * PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GL
 
 
 #endif /* GL_AMD_draw_buffers_blend */
 #endif /* GL_AMD_draw_buffers_blend */
 
 
+/* ----------------------- GL_AMD_multi_draw_indirect ---------------------- */
+
+#ifndef GL_AMD_multi_draw_indirect
+#define GL_AMD_multi_draw_indirect 1
+
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const void* indirect, GLsizei primcount, GLsizei stride);
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const void* indirect, GLsizei primcount, GLsizei stride);
+
+#define glMultiDrawArraysIndirectAMD GLEW_GET_FUN(__glewMultiDrawArraysIndirectAMD)
+#define glMultiDrawElementsIndirectAMD GLEW_GET_FUN(__glewMultiDrawElementsIndirectAMD)
+
+#define GLEW_AMD_multi_draw_indirect GLEW_GET_VAR(__GLEW_AMD_multi_draw_indirect)
+
+#endif /* GL_AMD_multi_draw_indirect */
+
 /* ------------------------- GL_AMD_name_gen_delete ------------------------ */
 /* ------------------------- GL_AMD_name_gen_delete ------------------------ */
 
 
 #ifndef GL_AMD_name_gen_delete
 #ifndef GL_AMD_name_gen_delete
@@ -3061,9 +3077,6 @@ typedef GLint (GLAPIENTRY * PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const ch
 #define GL_SYNC_CL_EVENT_ARB 0x8240
 #define GL_SYNC_CL_EVENT_ARB 0x8240
 #define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241
 #define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241
 
 
-typedef struct _cl_context *cl_context;
-typedef struct _cl_event *cl_event;
-
 typedef GLsync (GLAPIENTRY * PFNGLCREATESYNCFROMCLEVENTARBPROC) (cl_context context, cl_event event, GLbitfield flags);
 typedef GLsync (GLAPIENTRY * PFNGLCREATESYNCFROMCLEVENTARBPROC) (cl_context context, cl_event event, GLbitfield flags);
 
 
 #define glCreateSyncFromCLeventARB GLEW_GET_FUN(__glewCreateSyncFromCLeventARB)
 #define glCreateSyncFromCLeventARB GLEW_GET_FUN(__glewCreateSyncFromCLeventARB)
@@ -3144,8 +3157,6 @@ typedef void (GLAPIENTRY * PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readtarget, GLenu
 #define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147
 #define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147
 #define GL_DEBUG_SEVERITY_LOW_ARB 0x9148
 #define GL_DEBUG_SEVERITY_LOW_ARB 0x9148
 
 
-typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam);
-
 typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, void* userParam);
 typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, void* userParam);
 typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled);
 typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled);
 typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const char* buf);
 typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const char* buf);
@@ -5518,8 +5529,8 @@ typedef void (GLAPIENTRY * PFNGLWEIGHTUSVARBPROC) (GLint size, GLushort *weights
 #define GL_DYNAMIC_READ_ARB 0x88E9
 #define GL_DYNAMIC_READ_ARB 0x88E9
 #define GL_DYNAMIC_COPY_ARB 0x88EA
 #define GL_DYNAMIC_COPY_ARB 0x88EA
 
 
-typedef ptrdiff_t GLintptrARB;
 typedef ptrdiff_t GLsizeiptrARB;
 typedef ptrdiff_t GLsizeiptrARB;
+typedef ptrdiff_t GLintptrARB;
 
 
 typedef void (GLAPIENTRY * PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
 typedef void (GLAPIENTRY * PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
 typedef void (GLAPIENTRY * PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid* data, GLenum usage);
 typedef void (GLAPIENTRY * PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid* data, GLenum usage);
@@ -6240,8 +6251,8 @@ typedef void (GLAPIENTRY * PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
 typedef void (GLAPIENTRY * PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
 typedef void (GLAPIENTRY * PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
 typedef void (GLAPIENTRY * PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
 typedef void (GLAPIENTRY * PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
 
 
-#define glPNTrianglesfATI GLEW_GET_FUN(__glewPNTrianglesfATI)
-#define glPNTrianglesiATI GLEW_GET_FUN(__glewPNTrianglesiATI)
+#define glPNTrianglesfATI GLEW_GET_FUN(__glPNTrianglewesfATI)
+#define glPNTrianglesiATI GLEW_GET_FUN(__glPNTrianglewesiATI)
 
 
 #define GLEW_ATI_pn_triangles GLEW_GET_VAR(__GLEW_ATI_pn_triangles)
 #define GLEW_ATI_pn_triangles GLEW_GET_VAR(__GLEW_ATI_pn_triangles)
 
 
@@ -8186,7 +8197,7 @@ typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint gr
 typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
 typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
 typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
 typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
 typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
 typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
-typedef void (GLAPIENTRY * PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer);
 
 
 #define glSecondaryColor3bEXT GLEW_GET_FUN(__glewSecondaryColor3bEXT)
 #define glSecondaryColor3bEXT GLEW_GET_FUN(__glewSecondaryColor3bEXT)
 #define glSecondaryColor3bvEXT GLEW_GET_FUN(__glewSecondaryColor3bvEXT)
 #define glSecondaryColor3bvEXT GLEW_GET_FUN(__glewSecondaryColor3bvEXT)
@@ -11575,71 +11586,6 @@ typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei
 
 
 #endif /* GL_NV_vertex_program4 */
 #endif /* GL_NV_vertex_program4 */
 
 
-/* -------------------------- GL_NV_video_capture -------------------------- */
-
-#ifndef GL_NV_video_capture
-#define GL_NV_video_capture 1
-
-#define GL_VIDEO_BUFFER_NV 0x9020
-#define GL_VIDEO_BUFFER_BINDING_NV 0x9021
-#define GL_FIELD_UPPER_NV 0x9022
-#define GL_FIELD_LOWER_NV 0x9023
-#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024
-#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025
-#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026
-#define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027
-#define GL_VIDEO_BUFFER_PITCH_NV 0x9028
-#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029
-#define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A
-#define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B
-#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C
-#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D
-#define GL_PARTIAL_SUCCESS_NV 0x902E
-#define GL_SUCCESS_NV 0x902F
-#define GL_FAILURE_NV 0x9030
-#define GL_YCBYCR8_422_NV 0x9031
-#define GL_YCBAYCR8A_4224_NV 0x9032
-#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033
-#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034
-#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035
-#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036
-#define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037
-#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038
-#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039
-#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A
-#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B
-#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C
-
-typedef void (GLAPIENTRY * PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
-typedef void (GLAPIENTRY * PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);
-typedef void (GLAPIENTRY * PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);
-typedef void (GLAPIENTRY * PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
-typedef void (GLAPIENTRY * PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble* params);
-typedef void (GLAPIENTRY * PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat* params);
-typedef void (GLAPIENTRY * PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint* params);
-typedef void (GLAPIENTRY * PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint* params);
-typedef GLenum (GLAPIENTRY * PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint* sequence_num, GLuint64EXT *capture_time);
-typedef void (GLAPIENTRY * PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble* params);
-typedef void (GLAPIENTRY * PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat* params);
-typedef void (GLAPIENTRY * PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint* params);
-
-#define glBeginVideoCaptureNV GLEW_GET_FUN(__glewBeginVideoCaptureNV)
-#define glBindVideoCaptureStreamBufferNV GLEW_GET_FUN(__glewBindVideoCaptureStreamBufferNV)
-#define glBindVideoCaptureStreamTextureNV GLEW_GET_FUN(__glewBindVideoCaptureStreamTextureNV)
-#define glEndVideoCaptureNV GLEW_GET_FUN(__glewEndVideoCaptureNV)
-#define glGetVideoCaptureStreamdvNV GLEW_GET_FUN(__glewGetVideoCaptureStreamdvNV)
-#define glGetVideoCaptureStreamfvNV GLEW_GET_FUN(__glewGetVideoCaptureStreamfvNV)
-#define glGetVideoCaptureStreamivNV GLEW_GET_FUN(__glewGetVideoCaptureStreamivNV)
-#define glGetVideoCaptureivNV GLEW_GET_FUN(__glewGetVideoCaptureivNV)
-#define glVideoCaptureNV GLEW_GET_FUN(__glewVideoCaptureNV)
-#define glVideoCaptureStreamParameterdvNV GLEW_GET_FUN(__glewVideoCaptureStreamParameterdvNV)
-#define glVideoCaptureStreamParameterfvNV GLEW_GET_FUN(__glewVideoCaptureStreamParameterfvNV)
-#define glVideoCaptureStreamParameterivNV GLEW_GET_FUN(__glewVideoCaptureStreamParameterivNV)
-
-#define GLEW_NV_video_capture GLEW_GET_VAR(__GLEW_NV_video_capture)
-
-#endif /* GL_NV_video_capture */
-
 /* ------------------------ GL_OES_byte_coordinates ------------------------ */
 /* ------------------------ GL_OES_byte_coordinates ------------------------ */
 
 
 #ifndef GL_OES_byte_coordinates
 #ifndef GL_OES_byte_coordinates
@@ -13171,6 +13117,9 @@ GLEW_FUN_EXPORT PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC __glewBlendEquationSepa
 GLEW_FUN_EXPORT PFNGLBLENDFUNCINDEXEDAMDPROC __glewBlendFuncIndexedAMD;
 GLEW_FUN_EXPORT PFNGLBLENDFUNCINDEXEDAMDPROC __glewBlendFuncIndexedAMD;
 GLEW_FUN_EXPORT PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC __glewBlendFuncSeparateIndexedAMD;
 GLEW_FUN_EXPORT PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC __glewBlendFuncSeparateIndexedAMD;
 
 
+GLEW_FUN_EXPORT PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC __glewMultiDrawArraysIndirectAMD;
+GLEW_FUN_EXPORT PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC __glewMultiDrawElementsIndirectAMD;
+
 GLEW_FUN_EXPORT PFNGLDELETENAMESAMDPROC __glewDeleteNamesAMD;
 GLEW_FUN_EXPORT PFNGLDELETENAMESAMDPROC __glewDeleteNamesAMD;
 GLEW_FUN_EXPORT PFNGLGENNAMESAMDPROC __glewGenNamesAMD;
 GLEW_FUN_EXPORT PFNGLGENNAMESAMDPROC __glewGenNamesAMD;
 GLEW_FUN_EXPORT PFNGLISNAMEAMDPROC __glewIsNameAMD;
 GLEW_FUN_EXPORT PFNGLISNAMEAMDPROC __glewIsNameAMD;
@@ -13848,8 +13797,8 @@ GLEW_FUN_EXPORT PFNGLSETFRAGMENTSHADERCONSTANTATIPROC __glewSetFragmentShaderCon
 GLEW_FUN_EXPORT PFNGLMAPOBJECTBUFFERATIPROC __glewMapObjectBufferATI;
 GLEW_FUN_EXPORT PFNGLMAPOBJECTBUFFERATIPROC __glewMapObjectBufferATI;
 GLEW_FUN_EXPORT PFNGLUNMAPOBJECTBUFFERATIPROC __glewUnmapObjectBufferATI;
 GLEW_FUN_EXPORT PFNGLUNMAPOBJECTBUFFERATIPROC __glewUnmapObjectBufferATI;
 
 
-GLEW_FUN_EXPORT PFNGLPNTRIANGLESFATIPROC __glewPNTrianglesfATI;
-GLEW_FUN_EXPORT PFNGLPNTRIANGLESIATIPROC __glewPNTrianglesiATI;
+GLEW_FUN_EXPORT PFNGLPNTRIANGLESFATIPROC __glPNTrianglewesfATI;
+GLEW_FUN_EXPORT PFNGLPNTRIANGLESIATIPROC __glPNTrianglewesiATI;
 
 
 GLEW_FUN_EXPORT PFNGLSTENCILFUNCSEPARATEATIPROC __glewStencilFuncSeparateATI;
 GLEW_FUN_EXPORT PFNGLSTENCILFUNCSEPARATEATIPROC __glewStencilFuncSeparateATI;
 GLEW_FUN_EXPORT PFNGLSTENCILOPSEPARATEATIPROC __glewStencilOpSeparateATI;
 GLEW_FUN_EXPORT PFNGLSTENCILOPSEPARATEATIPROC __glewStencilOpSeparateATI;
@@ -14851,19 +14800,6 @@ GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS4FVNVPROC __glewVertexAttribs4fvNV;
 GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS4SVNVPROC __glewVertexAttribs4svNV;
 GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS4SVNVPROC __glewVertexAttribs4svNV;
 GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS4UBVNVPROC __glewVertexAttribs4ubvNV;
 GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS4UBVNVPROC __glewVertexAttribs4ubvNV;
 
 
-GLEW_FUN_EXPORT PFNGLBEGINVIDEOCAPTURENVPROC __glewBeginVideoCaptureNV;
-GLEW_FUN_EXPORT PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC __glewBindVideoCaptureStreamBufferNV;
-GLEW_FUN_EXPORT PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC __glewBindVideoCaptureStreamTextureNV;
-GLEW_FUN_EXPORT PFNGLENDVIDEOCAPTURENVPROC __glewEndVideoCaptureNV;
-GLEW_FUN_EXPORT PFNGLGETVIDEOCAPTURESTREAMDVNVPROC __glewGetVideoCaptureStreamdvNV;
-GLEW_FUN_EXPORT PFNGLGETVIDEOCAPTURESTREAMFVNVPROC __glewGetVideoCaptureStreamfvNV;
-GLEW_FUN_EXPORT PFNGLGETVIDEOCAPTURESTREAMIVNVPROC __glewGetVideoCaptureStreamivNV;
-GLEW_FUN_EXPORT PFNGLGETVIDEOCAPTUREIVNVPROC __glewGetVideoCaptureivNV;
-GLEW_FUN_EXPORT PFNGLVIDEOCAPTURENVPROC __glewVideoCaptureNV;
-GLEW_FUN_EXPORT PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC __glewVideoCaptureStreamParameterdvNV;
-GLEW_FUN_EXPORT PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC __glewVideoCaptureStreamParameterfvNV;
-GLEW_FUN_EXPORT PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC __glewVideoCaptureStreamParameterivNV;
-
 GLEW_FUN_EXPORT PFNGLCLEARDEPTHFOESPROC __glewClearDepthfOES;
 GLEW_FUN_EXPORT PFNGLCLEARDEPTHFOESPROC __glewClearDepthfOES;
 GLEW_FUN_EXPORT PFNGLCLIPPLANEFOESPROC __glewClipPlanefOES;
 GLEW_FUN_EXPORT PFNGLCLIPPLANEFOESPROC __glewClipPlanefOES;
 GLEW_FUN_EXPORT PFNGLDEPTHRANGEFOESPROC __glewDepthRangefOES;
 GLEW_FUN_EXPORT PFNGLDEPTHRANGEFOESPROC __glewDepthRangefOES;
@@ -15030,6 +14966,7 @@ GLEW_VAR_EXPORT GLboolean __GLEW_AMD_conservative_depth;
 GLEW_VAR_EXPORT GLboolean __GLEW_AMD_debug_output;
 GLEW_VAR_EXPORT GLboolean __GLEW_AMD_debug_output;
 GLEW_VAR_EXPORT GLboolean __GLEW_AMD_depth_clamp_separate;
 GLEW_VAR_EXPORT GLboolean __GLEW_AMD_depth_clamp_separate;
 GLEW_VAR_EXPORT GLboolean __GLEW_AMD_draw_buffers_blend;
 GLEW_VAR_EXPORT GLboolean __GLEW_AMD_draw_buffers_blend;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_multi_draw_indirect;
 GLEW_VAR_EXPORT GLboolean __GLEW_AMD_name_gen_delete;
 GLEW_VAR_EXPORT GLboolean __GLEW_AMD_name_gen_delete;
 GLEW_VAR_EXPORT GLboolean __GLEW_AMD_performance_monitor;
 GLEW_VAR_EXPORT GLboolean __GLEW_AMD_performance_monitor;
 GLEW_VAR_EXPORT GLboolean __GLEW_AMD_sample_positions;
 GLEW_VAR_EXPORT GLboolean __GLEW_AMD_sample_positions;
@@ -15354,7 +15291,6 @@ GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_program2;
 GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_program2_option;
 GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_program2_option;
 GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_program3;
 GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_program3;
 GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_program4;
 GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_program4;
-GLEW_VAR_EXPORT GLboolean __GLEW_NV_video_capture;
 GLEW_VAR_EXPORT GLboolean __GLEW_OES_byte_coordinates;
 GLEW_VAR_EXPORT GLboolean __GLEW_OES_byte_coordinates;
 GLEW_VAR_EXPORT GLboolean __GLEW_OES_compressed_paletted_texture;
 GLEW_VAR_EXPORT GLboolean __GLEW_OES_compressed_paletted_texture;
 GLEW_VAR_EXPORT GLboolean __GLEW_OES_read_format;
 GLEW_VAR_EXPORT GLboolean __GLEW_OES_read_format;

+ 5 - 36
extern/include/GL/glxew.h

@@ -258,8 +258,8 @@ typedef Display* ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
 #define GLX_DONT_CARE 0xFFFFFFFF
 #define GLX_DONT_CARE 0xFFFFFFFF
 
 
 typedef XID GLXFBConfigID;
 typedef XID GLXFBConfigID;
-typedef XID GLXPbuffer;
 typedef XID GLXWindow;
 typedef XID GLXWindow;
+typedef XID GLXPbuffer;
 typedef struct __GLXFBConfigRec *GLXFBConfig;
 typedef struct __GLXFBConfigRec *GLXFBConfig;
 
 
 typedef struct {
 typedef struct {
@@ -876,33 +876,6 @@ typedef void ( * PFNGLXFREEMEMORYNVPROC) (void *pointer);
 
 
 #endif /* GLX_NV_vertex_array_range */
 #endif /* GLX_NV_vertex_array_range */
 
 
-/* -------------------------- GLX_NV_video_capture ------------------------- */
-
-#ifndef GLX_NV_video_capture
-#define GLX_NV_video_capture 1
-
-#define GLX_DEVICE_ID_NV 0x20CD
-#define GLX_UNIQUE_ID_NV 0x20CE
-#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
-
-typedef XID GLXVideoCaptureDeviceNV;
-
-typedef int ( * PFNGLXBINDVIDEOCAPTUREDEVICENVPROC) (Display* dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
-typedef GLXVideoCaptureDeviceNV * ( * PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC) (Display* dpy, int screen, int *nelements);
-typedef void ( * PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC) (Display* dpy, GLXVideoCaptureDeviceNV device);
-typedef int ( * PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC) (Display* dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value);
-typedef void ( * PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC) (Display* dpy, GLXVideoCaptureDeviceNV device);
-
-#define glXBindVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXBindVideoCaptureDeviceNV)
-#define glXEnumerateVideoCaptureDevicesNV GLXEW_GET_FUN(__glewXEnumerateVideoCaptureDevicesNV)
-#define glXLockVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXLockVideoCaptureDeviceNV)
-#define glXQueryVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXQueryVideoCaptureDeviceNV)
-#define glXReleaseVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXReleaseVideoCaptureDeviceNV)
-
-#define GLXEW_NV_video_capture GLXEW_GET_VAR(__GLXEW_NV_video_capture)
-
-#endif /* GLX_NV_video_capture */
-
 /* -------------------------- GLX_NV_video_output -------------------------- */
 /* -------------------------- GLX_NV_video_output -------------------------- */
 
 
 #ifndef GLX_NV_video_output
 #ifndef GLX_NV_video_output
@@ -953,7 +926,8 @@ typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf,
 
 
 /* -------------------------- GLX_OML_sync_control ------------------------- */
 /* -------------------------- GLX_OML_sync_control ------------------------- */
 
 
-#ifndef GLX_OML_sync_control
+#if !defined(GLX_OML_sync_control) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+#include <inttypes.h>
 #define GLX_OML_sync_control 1
 #define GLX_OML_sync_control 1
 
 
 typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator);
 typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator);
@@ -1400,12 +1374,6 @@ extern PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
 extern PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
 extern PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
 extern PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
 extern PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
 
 
-extern PFNGLXBINDVIDEOCAPTUREDEVICENVPROC __glewXBindVideoCaptureDeviceNV;
-extern PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC __glewXEnumerateVideoCaptureDevicesNV;
-extern PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC __glewXLockVideoCaptureDeviceNV;
-extern PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC __glewXQueryVideoCaptureDeviceNV;
-extern PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC __glewXReleaseVideoCaptureDeviceNV;
-
 extern PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
 extern PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
 extern PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
 extern PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
 extern PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
 extern PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
@@ -1413,11 +1381,13 @@ extern PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
 extern PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
 extern PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
 extern PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
 extern PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
 
 
+#ifdef GLX_OML_sync_control
 extern PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
 extern PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
 extern PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML;
 extern PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML;
 extern PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML;
 extern PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML;
 extern PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML;
 extern PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML;
 extern PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML;
 extern PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML;
+#endif
 
 
 extern PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX;
 extern PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX;
 extern PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX;
 extern PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX;
@@ -1510,7 +1480,6 @@ GLXEW_EXPORT GLboolean __GLXEW_NV_multisample_coverage;
 GLXEW_EXPORT GLboolean __GLXEW_NV_present_video;
 GLXEW_EXPORT GLboolean __GLXEW_NV_present_video;
 GLXEW_EXPORT GLboolean __GLXEW_NV_swap_group;
 GLXEW_EXPORT GLboolean __GLXEW_NV_swap_group;
 GLXEW_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
 GLXEW_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
-GLXEW_EXPORT GLboolean __GLXEW_NV_video_capture;
 GLXEW_EXPORT GLboolean __GLXEW_NV_video_output;
 GLXEW_EXPORT GLboolean __GLXEW_NV_video_output;
 GLXEW_EXPORT GLboolean __GLXEW_OML_swap_method;
 GLXEW_EXPORT GLboolean __GLXEW_OML_swap_method;
 GLXEW_EXPORT GLboolean __GLXEW_OML_sync_control;
 GLXEW_EXPORT GLboolean __GLXEW_OML_sync_control;

+ 0 - 33
extern/include/GL/wglew.h

@@ -1027,32 +1027,6 @@ typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
 
 
 #endif /* WGL_NV_vertex_array_range */
 #endif /* WGL_NV_vertex_array_range */
 
 
-/* -------------------------- WGL_NV_video_capture ------------------------- */
-
-#ifndef WGL_NV_video_capture
-#define WGL_NV_video_capture 1
-
-#define WGL_UNIQUE_ID_NV 0x20CE
-#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
-
-DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
-
-typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
-typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV* phDeviceList);
-typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
-typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int* piValue);
-typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
-
-#define wglBindVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewBindVideoCaptureDeviceNV)
-#define wglEnumerateVideoCaptureDevicesNV WGLEW_GET_FUN(__wglewEnumerateVideoCaptureDevicesNV)
-#define wglLockVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewLockVideoCaptureDeviceNV)
-#define wglQueryVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewQueryVideoCaptureDeviceNV)
-#define wglReleaseVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewReleaseVideoCaptureDeviceNV)
-
-#define WGLEW_NV_video_capture WGLEW_GET_VAR(__WGLEW_NV_video_capture)
-
-#endif /* WGL_NV_video_capture */
-
 /* -------------------------- WGL_NV_video_output -------------------------- */
 /* -------------------------- WGL_NV_video_output -------------------------- */
 
 
 #ifndef WGL_NV_video_output
 #ifndef WGL_NV_video_output
@@ -1256,12 +1230,6 @@ WGLEW_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
 WGLEW_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
 WGLEW_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
 WGLEW_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
 WGLEW_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
 
 
-WGLEW_EXPORT PFNWGLBINDVIDEOCAPTUREDEVICENVPROC __wglewBindVideoCaptureDeviceNV;
-WGLEW_EXPORT PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC __wglewEnumerateVideoCaptureDevicesNV;
-WGLEW_EXPORT PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC __wglewLockVideoCaptureDeviceNV;
-WGLEW_EXPORT PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC __wglewQueryVideoCaptureDeviceNV;
-WGLEW_EXPORT PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC __wglewReleaseVideoCaptureDeviceNV;
-
 WGLEW_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV;
 WGLEW_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV;
 WGLEW_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV;
 WGLEW_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV;
 WGLEW_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV;
 WGLEW_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV;
@@ -1319,7 +1287,6 @@ WGLEW_EXPORT GLboolean __WGLEW_NV_render_depth_texture;
 WGLEW_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle;
 WGLEW_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle;
 WGLEW_EXPORT GLboolean __WGLEW_NV_swap_group;
 WGLEW_EXPORT GLboolean __WGLEW_NV_swap_group;
 WGLEW_EXPORT GLboolean __WGLEW_NV_vertex_array_range;
 WGLEW_EXPORT GLboolean __WGLEW_NV_vertex_array_range;
-WGLEW_EXPORT GLboolean __WGLEW_NV_video_capture;
 WGLEW_EXPORT GLboolean __WGLEW_NV_video_output;
 WGLEW_EXPORT GLboolean __WGLEW_NV_video_output;
 WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control;
 WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control;
 
 

+ 4 - 4
extern/include/bullet/Bullet-C-Api.h

@@ -65,7 +65,7 @@ extern "C" {
 	Create and Delete a Physics SDK	
 	Create and Delete a Physics SDK	
 */
 */
 
 
-	extern	plPhysicsSdkHandle	plNewBulletSdk(); //this could be also another sdk, like ODE, PhysX etc.
+	extern	plPhysicsSdkHandle	plNewBulletSdk(void); //this could be also another sdk, like ODE, PhysX etc.
 	extern	void		plDeletePhysicsSdk(plPhysicsSdkHandle	physicsSdk);
 	extern	void		plDeletePhysicsSdk(plPhysicsSdkHandle	physicsSdk);
 
 
 /** Collision World, not strictly necessary, you can also just create a Dynamics World with Rigid Bodies which internally manages the Collision World with Collision Objects */
 /** Collision World, not strictly necessary, you can also just create a Dynamics World with Rigid Bodies which internally manages the Collision World with Collision Objects */
@@ -116,16 +116,16 @@ extern "C" {
 	extern  plCollisionShapeHandle plNewCapsuleShape(plReal radius, plReal height);	
 	extern  plCollisionShapeHandle plNewCapsuleShape(plReal radius, plReal height);	
 	extern  plCollisionShapeHandle plNewConeShape(plReal radius, plReal height);
 	extern  plCollisionShapeHandle plNewConeShape(plReal radius, plReal height);
 	extern  plCollisionShapeHandle plNewCylinderShape(plReal radius, plReal height);
 	extern  plCollisionShapeHandle plNewCylinderShape(plReal radius, plReal height);
-	extern	plCollisionShapeHandle plNewCompoundShape();
+	extern	plCollisionShapeHandle plNewCompoundShape(void);
 	extern	void	plAddChildShape(plCollisionShapeHandle compoundShape,plCollisionShapeHandle childShape, plVector3 childPos,plQuaternion childOrn);
 	extern	void	plAddChildShape(plCollisionShapeHandle compoundShape,plCollisionShapeHandle childShape, plVector3 childPos,plQuaternion childOrn);
 
 
 	extern  void plDeleteShape(plCollisionShapeHandle shape);
 	extern  void plDeleteShape(plCollisionShapeHandle shape);
 
 
 	/* Convex Meshes */
 	/* Convex Meshes */
-	extern  plCollisionShapeHandle plNewConvexHullShape();
+	extern  plCollisionShapeHandle plNewConvexHullShape(void);
 	extern  void		plAddVertex(plCollisionShapeHandle convexHull, plReal x,plReal y,plReal z);
 	extern  void		plAddVertex(plCollisionShapeHandle convexHull, plReal x,plReal y,plReal z);
 /* Concave static triangle meshes */
 /* Concave static triangle meshes */
-	extern  plMeshInterfaceHandle		   plNewMeshInterface();
+	extern  plMeshInterfaceHandle		   plNewMeshInterface(void);
 	extern  void		plAddTriangle(plMeshInterfaceHandle meshHandle, plVector3 v0,plVector3 v1,plVector3 v2);
 	extern  void		plAddTriangle(plMeshInterfaceHandle meshHandle, plVector3 v0,plVector3 v1,plVector3 v2);
 	extern  plCollisionShapeHandle plNewStaticTriangleMeshShape(plMeshInterfaceHandle);
 	extern  plCollisionShapeHandle plNewStaticTriangleMeshShape(plMeshInterfaceHandle);
 
 

+ 2 - 2
extern/include/bullet/BulletCollision/BroadphaseCollision/btAxisSweep3.h

@@ -16,8 +16,8 @@
 //
 //
 // 3. This notice may not be removed or altered from any source distribution.
 // 3. This notice may not be removed or altered from any source distribution.
 
 
-#ifndef AXIS_SWEEP_3_H
-#define AXIS_SWEEP_3_H
+#ifndef BT_AXIS_SWEEP_3_H
+#define BT_AXIS_SWEEP_3_H
 
 
 #include "LinearMath/btVector3.h"
 #include "LinearMath/btVector3.h"
 #include "btOverlappingPairCache.h"
 #include "btOverlappingPairCache.h"

+ 3 - 3
extern/include/bullet/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef		BROADPHASE_INTERFACE_H
-#define 	BROADPHASE_INTERFACE_H
+#ifndef		BT_BROADPHASE_INTERFACE_H
+#define 	BT_BROADPHASE_INTERFACE_H
 
 
 
 
 
 
@@ -79,4 +79,4 @@ public:
 
 
 };
 };
 
 
-#endif //BROADPHASE_INTERFACE_H
+#endif //BT_BROADPHASE_INTERFACE_H

+ 3 - 3
extern/include/bullet/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef BROADPHASE_PROXY_H
-#define BROADPHASE_PROXY_H
+#ifndef BT_BROADPHASE_PROXY_H
+#define BT_BROADPHASE_PROXY_H
 
 
 #include "LinearMath/btScalar.h" //for SIMD_FORCE_INLINE
 #include "LinearMath/btScalar.h" //for SIMD_FORCE_INLINE
 #include "LinearMath/btVector3.h"
 #include "LinearMath/btVector3.h"
@@ -266,5 +266,5 @@ SIMD_FORCE_INLINE bool operator==(const btBroadphasePair& a, const btBroadphaseP
 }
 }
 
 
 
 
-#endif //BROADPHASE_PROXY_H
+#endif //BT_BROADPHASE_PROXY_H
 
 

+ 5 - 5
extern/include/bullet/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef COLLISION_ALGORITHM_H
-#define COLLISION_ALGORITHM_H
+#ifndef BT_COLLISION_ALGORITHM_H
+#define BT_COLLISION_ALGORITHM_H
 
 
 #include "LinearMath/btScalar.h"
 #include "LinearMath/btScalar.h"
 #include "LinearMath/btAlignedObjectArray.h"
 #include "LinearMath/btAlignedObjectArray.h"
@@ -44,7 +44,7 @@ struct btCollisionAlgorithmConstructionInfo
 	btDispatcher*	m_dispatcher1;
 	btDispatcher*	m_dispatcher1;
 	btPersistentManifold*	m_manifold;
 	btPersistentManifold*	m_manifold;
 
 
-	int	getDispatcherId();
+//	int	getDispatcherId();
 
 
 };
 };
 
 
@@ -59,7 +59,7 @@ protected:
 	btDispatcher*	m_dispatcher;
 	btDispatcher*	m_dispatcher;
 
 
 protected:
 protected:
-	int	getDispatcherId();
+//	int	getDispatcherId();
 	
 	
 public:
 public:
 
 
@@ -77,4 +77,4 @@ public:
 };
 };
 
 
 
 
-#endif //COLLISION_ALGORITHM_H
+#endif //BT_COLLISION_ALGORITHM_H

+ 8 - 8
extern/include/bullet/BulletCollision/BroadphaseCollision/btDbvt.h

@@ -863,23 +863,23 @@ inline void		btDbvt::collideTT(	const btDbvtNode* root0,
 					{
 					{
 						if(p.b->isinternal())
 						if(p.b->isinternal())
 						{					
 						{					
-							stkStack[depth++]=sStkNN(p.a->objChilds[0],p.b->objChilds[0]);
-							stkStack[depth++]=sStkNN(p.a->objChilds[1],p.b->objChilds[0]);
-							stkStack[depth++]=sStkNN(p.a->objChilds[0],p.b->objChilds[1]);
-							stkStack[depth++]=sStkNN(p.a->objChilds[1],p.b->objChilds[1]);
+							stkStack[depth++]=sStkNN(p.a->childs[0],p.b->childs[0]);
+							stkStack[depth++]=sStkNN(p.a->childs[1],p.b->childs[0]);
+							stkStack[depth++]=sStkNN(p.a->childs[0],p.b->childs[1]);
+							stkStack[depth++]=sStkNN(p.a->childs[1],p.b->childs[1]);
 						}
 						}
 						else
 						else
 						{
 						{
-							stkStack[depth++]=sStkNN(p.a->objChilds[0],p.b);
-							stkStack[depth++]=sStkNN(p.a->objChilds[1],p.b);
+							stkStack[depth++]=sStkNN(p.a->childs[0],p.b);
+							stkStack[depth++]=sStkNN(p.a->childs[1],p.b);
 						}
 						}
 					}
 					}
 					else
 					else
 					{
 					{
 						if(p.b->isinternal())
 						if(p.b->isinternal())
 						{
 						{
-							stkStack[depth++]=sStkNN(p.a,p.b->objChilds[0]);
-							stkStack[depth++]=sStkNN(p.a,p.b->objChilds[1]);
+							stkStack[depth++]=sStkNN(p.a,p.b->childs[0]);
+							stkStack[depth++]=sStkNN(p.a,p.b->childs[1]);
 						}
 						}
 						else
 						else
 						{
 						{

+ 9 - 5
extern/include/bullet/BulletCollision/BroadphaseCollision/btDispatcher.h

@@ -13,9 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef _DISPATCHER_H
-#define _DISPATCHER_H
-
+#ifndef BT_DISPATCHER_H
+#define BT_DISPATCHER_H
 #include "LinearMath/btScalar.h"
 #include "LinearMath/btScalar.h"
 
 
 class btCollisionAlgorithm;
 class btCollisionAlgorithm;
@@ -27,6 +26,7 @@ class btOverlappingPairCache;
 
 
 class btPersistentManifold;
 class btPersistentManifold;
 class btStackAlloc;
 class btStackAlloc;
+class btPoolAllocator;
 
 
 struct btDispatcherInfo
 struct btDispatcherInfo
 {
 {
@@ -40,7 +40,7 @@ struct btDispatcherInfo
 		m_stepCount(0),
 		m_stepCount(0),
 		m_dispatchFunc(DISPATCH_DISCRETE),
 		m_dispatchFunc(DISPATCH_DISCRETE),
 		m_timeOfImpact(btScalar(1.)),
 		m_timeOfImpact(btScalar(1.)),
-		m_useContinuous(false),
+		m_useContinuous(true),
 		m_debugDraw(0),
 		m_debugDraw(0),
 		m_enableSatConvex(false),
 		m_enableSatConvex(false),
 		m_enableSPU(true),
 		m_enableSPU(true),
@@ -96,6 +96,10 @@ public:
 
 
 	virtual	btPersistentManifold**	getInternalManifoldPointer() = 0;
 	virtual	btPersistentManifold**	getInternalManifoldPointer() = 0;
 
 
+	virtual	btPoolAllocator*	getInternalManifoldPool() = 0;
+
+	virtual	const btPoolAllocator*	getInternalManifoldPool() const = 0;
+
 	virtual	void* allocateCollisionAlgorithm(int size)  = 0;
 	virtual	void* allocateCollisionAlgorithm(int size)  = 0;
 
 
 	virtual	void freeCollisionAlgorithm(void* ptr) = 0;
 	virtual	void freeCollisionAlgorithm(void* ptr) = 0;
@@ -103,4 +107,4 @@ public:
 };
 };
 
 
 
 
-#endif //_DISPATCHER_H
+#endif //BT_DISPATCHER_H

+ 3 - 3
extern/include/bullet/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef OVERLAPPING_PAIR_CACHE_H
-#define OVERLAPPING_PAIR_CACHE_H
+#ifndef BT_OVERLAPPING_PAIR_CACHE_H
+#define BT_OVERLAPPING_PAIR_CACHE_H
 
 
 
 
 #include "btBroadphaseInterface.h"
 #include "btBroadphaseInterface.h"
@@ -464,6 +464,6 @@ public:
 };
 };
 
 
 
 
-#endif //OVERLAPPING_PAIR_CACHE_H
+#endif //BT_OVERLAPPING_PAIR_CACHE_H
 
 
 
 

+ 3 - 3
extern/include/bullet/BulletCollision/BroadphaseCollision/btQuantizedBvh.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef QUANTIZED_BVH_H
-#define QUANTIZED_BVH_H
+#ifndef BT_QUANTIZED_BVH_H
+#define BT_QUANTIZED_BVH_H
 
 
 class btSerializer;
 class btSerializer;
 
 
@@ -576,4 +576,4 @@ SIMD_FORCE_INLINE	int	btQuantizedBvh::calculateSerializeBufferSizeNew() const
 
 
 
 
 
 
-#endif //QUANTIZED_BVH_H
+#endif //BT_QUANTIZED_BVH_H

+ 3 - 3
extern/include/bullet/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef SIMPLE_BROADPHASE_H
-#define SIMPLE_BROADPHASE_H
+#ifndef BT_SIMPLE_BROADPHASE_H
+#define BT_SIMPLE_BROADPHASE_H
 
 
 
 
 #include "btOverlappingPairCache.h"
 #include "btOverlappingPairCache.h"
@@ -167,5 +167,5 @@ public:
 
 
 
 
 
 
-#endif //SIMPLE_BROADPHASE_H
+#endif //BT_SIMPLE_BROADPHASE_H
 
 

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionDispatch/SphereTriangleDetector.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef SPHERE_TRIANGLE_DETECTOR_H
-#define SPHERE_TRIANGLE_DETECTOR_H
+#ifndef BT_SPHERE_TRIANGLE_DETECTOR_H
+#define BT_SPHERE_TRIANGLE_DETECTOR_H
 
 
 #include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h"
 #include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h"
 
 
@@ -47,5 +47,5 @@ private:
 	btScalar	m_contactBreakingThreshold;
 	btScalar	m_contactBreakingThreshold;
 	
 	
 };
 };
-#endif //SPHERE_TRIANGLE_DETECTOR_H
+#endif //BT_SPHERE_TRIANGLE_DETECTOR_H
 
 

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef BOX_2D_BOX_2D__COLLISION_ALGORITHM_H
-#define BOX_2D_BOX_2D__COLLISION_ALGORITHM_H
+#ifndef BT_BOX_2D_BOX_2D__COLLISION_ALGORITHM_H
+#define BT_BOX_2D_BOX_2D__COLLISION_ALGORITHM_H
 
 
 #include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h"
 #include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
@@ -62,5 +62,5 @@ public:
 
 
 };
 };
 
 
-#endif //BOX_2D_BOX_2D__COLLISION_ALGORITHM_H
+#endif //BT_BOX_2D_BOX_2D__COLLISION_ALGORITHM_H
 
 

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef BOX_BOX__COLLISION_ALGORITHM_H
-#define BOX_BOX__COLLISION_ALGORITHM_H
+#ifndef BT_BOX_BOX__COLLISION_ALGORITHM_H
+#define BT_BOX_BOX__COLLISION_ALGORITHM_H
 
 
 #include "btActivatingCollisionAlgorithm.h"
 #include "btActivatingCollisionAlgorithm.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
@@ -62,5 +62,5 @@ public:
 
 
 };
 };
 
 
-#endif //BOX_BOX__COLLISION_ALGORITHM_H
+#endif //BT_BOX_BOX__COLLISION_ALGORITHM_H
 
 

+ 2 - 2
extern/include/bullet/BulletCollision/CollisionDispatch/btBoxBoxDetector.h

@@ -16,8 +16,8 @@ subject to the following restrictions:
 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
-#ifndef BOX_BOX_DETECTOR_H
-#define BOX_BOX_DETECTOR_H
+#ifndef BT_BOX_BOX_DETECTOR_H
+#define BT_BOX_BOX_DETECTOR_H
 
 
 
 
 class btBoxShape;
 class btBoxShape;

+ 1 - 0
extern/include/bullet/BulletCollision/CollisionDispatch/btCollisionConfiguration.h

@@ -15,6 +15,7 @@ subject to the following restrictions:
 
 
 #ifndef BT_COLLISION_CONFIGURATION
 #ifndef BT_COLLISION_CONFIGURATION
 #define BT_COLLISION_CONFIGURATION
 #define BT_COLLISION_CONFIGURATION
+
 struct btCollisionAlgorithmCreateFunc;
 struct btCollisionAlgorithmCreateFunc;
 
 
 class btStackAlloc;
 class btStackAlloc;

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef COLLISION_CREATE_FUNC
-#define COLLISION_CREATE_FUNC
+#ifndef BT_COLLISION_CREATE_FUNC
+#define BT_COLLISION_CREATE_FUNC
 
 
 #include "LinearMath/btAlignedObjectArray.h"
 #include "LinearMath/btAlignedObjectArray.h"
 class btCollisionAlgorithm;
 class btCollisionAlgorithm;
@@ -41,5 +41,5 @@ struct btCollisionAlgorithmCreateFunc
 		return 0;
 		return 0;
 	}
 	}
 };
 };
-#endif //COLLISION_CREATE_FUNC
+#endif //BT_COLLISION_CREATE_FUNC
 
 

+ 20 - 7
extern/include/bullet/BulletCollision/CollisionDispatch/btCollisionDispatcher.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef COLLISION__DISPATCHER_H
-#define COLLISION__DISPATCHER_H
+#ifndef BT_COLLISION__DISPATCHER_H
+#define BT_COLLISION__DISPATCHER_H
 
 
 #include "BulletCollision/BroadphaseCollision/btDispatcher.h"
 #include "BulletCollision/BroadphaseCollision/btDispatcher.h"
 #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
 #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
@@ -42,8 +42,11 @@ typedef void (*btNearCallback)(btBroadphasePair& collisionPair, btCollisionDispa
 ///Time of Impact, Closest Points and Penetration Depth.
 ///Time of Impact, Closest Points and Penetration Depth.
 class btCollisionDispatcher : public btDispatcher
 class btCollisionDispatcher : public btDispatcher
 {
 {
+
+protected:
+
 	int		m_dispatcherFlags;
 	int		m_dispatcherFlags;
-	
+
 	btAlignedObjectArray<btPersistentManifold*>	m_manifoldsPtr;
 	btAlignedObjectArray<btPersistentManifold*>	m_manifoldsPtr;
 
 
 	btManifoldResult	m_defaultManifoldResult;
 	btManifoldResult	m_defaultManifoldResult;
@@ -64,7 +67,8 @@ public:
 	enum DispatcherFlags
 	enum DispatcherFlags
 	{
 	{
 		CD_STATIC_STATIC_REPORTED = 1,
 		CD_STATIC_STATIC_REPORTED = 1,
-		CD_USE_RELATIVE_CONTACT_BREAKING_THRESHOLD = 2
+		CD_USE_RELATIVE_CONTACT_BREAKING_THRESHOLD = 2,
+		CD_DISABLE_CONTACTPOOL_DYNAMIC_ALLOCATION = 4
 	};
 	};
 
 
 	int	getDispatcherFlags() const
 	int	getDispatcherFlags() const
@@ -74,8 +78,7 @@ public:
 
 
 	void	setDispatcherFlags(int flags)
 	void	setDispatcherFlags(int flags)
 	{
 	{
-        (void) flags;
-		m_dispatcherFlags = 0;
+		m_dispatcherFlags = flags;
 	}
 	}
 
 
 	///registerCollisionCreateFunc allows registration of custom/alternative collision create functions
 	///registerCollisionCreateFunc allows registration of custom/alternative collision create functions
@@ -153,7 +156,17 @@ public:
 		m_collisionConfiguration = config;
 		m_collisionConfiguration = config;
 	}
 	}
 
 
+	virtual	btPoolAllocator*	getInternalManifoldPool()
+	{
+		return m_persistentManifoldPoolAllocator;
+	}
+
+	virtual	const btPoolAllocator*	getInternalManifoldPool() const
+	{
+		return m_persistentManifoldPoolAllocator;
+	}
+
 };
 };
 
 
-#endif //COLLISION__DISPATCHER_H
+#endif //BT_COLLISION__DISPATCHER_H
 
 

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionDispatch/btCollisionObject.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef COLLISION_OBJECT_H
-#define COLLISION_OBJECT_H
+#ifndef BT_COLLISION_OBJECT_H
+#define BT_COLLISION_OBJECT_H
 
 
 #include "LinearMath/btTransform.h"
 #include "LinearMath/btTransform.h"
 
 
@@ -521,4 +521,4 @@ SIMD_FORCE_INLINE	int	btCollisionObject::calculateSerializeBufferSize() const
 
 
 
 
 
 
-#endif //COLLISION_OBJECT_H
+#endif //BT_COLLISION_OBJECT_H

+ 42 - 3
extern/include/bullet/BulletCollision/CollisionDispatch/btCollisionWorld.h

@@ -62,8 +62,8 @@ subject to the following restrictions:
  
  
  
  
 
 
-#ifndef COLLISION_WORLD_H
-#define COLLISION_WORLD_H
+#ifndef BT_COLLISION_WORLD_H
+#define BT_COLLISION_WORLD_H
 
 
 class btStackAlloc;
 class btStackAlloc;
 class btCollisionShape;
 class btCollisionShape;
@@ -264,6 +264,45 @@ public:
 		}
 		}
 	};
 	};
 
 
+	struct	AllHitsRayResultCallback : public RayResultCallback
+	{
+		AllHitsRayResultCallback(const btVector3&	rayFromWorld,const btVector3&	rayToWorld)
+		:m_rayFromWorld(rayFromWorld),
+		m_rayToWorld(rayToWorld)
+		{
+		}
+
+		btAlignedObjectArray<btCollisionObject*>		m_collisionObjects;
+
+		btVector3	m_rayFromWorld;//used to calculate hitPointWorld from hitFraction
+		btVector3	m_rayToWorld;
+
+		btAlignedObjectArray<btVector3>	m_hitNormalWorld;
+		btAlignedObjectArray<btVector3>	m_hitPointWorld;
+		btAlignedObjectArray<btScalar> m_hitFractions;
+			
+		virtual	btScalar	addSingleResult(LocalRayResult& rayResult,bool normalInWorldSpace)
+		{
+			m_collisionObject = rayResult.m_collisionObject;
+			m_collisionObjects.push_back(rayResult.m_collisionObject);
+			btVector3 hitNormalWorld;
+			if (normalInWorldSpace)
+			{
+				hitNormalWorld = rayResult.m_hitNormalLocal;
+			} else
+			{
+				///need to transform normal into worldspace
+				hitNormalWorld = m_collisionObject->getWorldTransform().getBasis()*rayResult.m_hitNormalLocal;
+			}
+			m_hitNormalWorld.push_back(hitNormalWorld);
+			btVector3 hitPointWorld;
+			hitPointWorld.setInterpolate3(m_rayFromWorld,m_rayToWorld,rayResult.m_hitFraction);
+			m_hitPointWorld.push_back(hitPointWorld);
+			m_hitFractions.push_back(rayResult.m_hitFraction);
+			return m_closestHitFraction;
+		}
+	};
+
 
 
 	struct LocalConvexResult
 	struct LocalConvexResult
 	{
 	{
@@ -467,4 +506,4 @@ public:
 };
 };
 
 
 
 
-#endif //COLLISION_WORLD_H
+#endif //BT_COLLISION_WORLD_H

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef COMPOUND_COLLISION_ALGORITHM_H
-#define COMPOUND_COLLISION_ALGORITHM_H
+#ifndef BT_COMPOUND_COLLISION_ALGORITHM_H
+#define BT_COMPOUND_COLLISION_ALGORITHM_H
 
 
 #include "btActivatingCollisionAlgorithm.h"
 #include "btActivatingCollisionAlgorithm.h"
 #include "BulletCollision/BroadphaseCollision/btDispatcher.h"
 #include "BulletCollision/BroadphaseCollision/btDispatcher.h"
@@ -83,4 +83,4 @@ public:
 
 
 };
 };
 
 
-#endif //COMPOUND_COLLISION_ALGORITHM_H
+#endif //BT_COMPOUND_COLLISION_ALGORITHM_H

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef CONVEX_2D_CONVEX_2D_ALGORITHM_H
-#define CONVEX_2D_CONVEX_2D_ALGORITHM_H
+#ifndef BT_CONVEX_2D_CONVEX_2D_ALGORITHM_H
+#define BT_CONVEX_2D_CONVEX_2D_ALGORITHM_H
 
 
 #include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h"
 #include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h"
 #include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h"
 #include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h"
@@ -92,4 +92,4 @@ public:
 
 
 };
 };
 
 
-#endif //CONVEX_2D_CONVEX_2D_ALGORITHM_H
+#endif //BT_CONVEX_2D_CONVEX_2D_ALGORITHM_H

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef CONVEX_CONCAVE_COLLISION_ALGORITHM_H
-#define CONVEX_CONCAVE_COLLISION_ALGORITHM_H
+#ifndef BT_CONVEX_CONCAVE_COLLISION_ALGORITHM_H
+#define BT_CONVEX_CONCAVE_COLLISION_ALGORITHM_H
 
 
 #include "btActivatingCollisionAlgorithm.h"
 #include "btActivatingCollisionAlgorithm.h"
 #include "BulletCollision/BroadphaseCollision/btDispatcher.h"
 #include "BulletCollision/BroadphaseCollision/btDispatcher.h"
@@ -113,4 +113,4 @@ public:
 
 
 };
 };
 
 
-#endif //CONVEX_CONCAVE_COLLISION_ALGORITHM_H
+#endif //BT_CONVEX_CONCAVE_COLLISION_ALGORITHM_H

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef CONVEX_CONVEX_ALGORITHM_H
-#define CONVEX_CONVEX_ALGORITHM_H
+#ifndef BT_CONVEX_CONVEX_ALGORITHM_H
+#define BT_CONVEX_CONVEX_ALGORITHM_H
 
 
 #include "btActivatingCollisionAlgorithm.h"
 #include "btActivatingCollisionAlgorithm.h"
 #include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h"
 #include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h"
@@ -106,4 +106,4 @@ public:
 
 
 };
 };
 
 
-#endif //CONVEX_CONVEX_ALGORITHM_H
+#endif //BT_CONVEX_CONVEX_ALGORITHM_H

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef CONVEX_PLANE_COLLISION_ALGORITHM_H
-#define CONVEX_PLANE_COLLISION_ALGORITHM_H
+#ifndef BT_CONVEX_PLANE_COLLISION_ALGORITHM_H
+#define BT_CONVEX_PLANE_COLLISION_ALGORITHM_H
 
 
 #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
 #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
@@ -80,5 +80,5 @@ public:
 
 
 };
 };
 
 
-#endif //CONVEX_PLANE_COLLISION_ALGORITHM_H
+#endif //BT_CONVEX_PLANE_COLLISION_ALGORITHM_H
 
 

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef EMPTY_ALGORITH
-#define EMPTY_ALGORITH
+#ifndef BT_EMPTY_ALGORITH
+#define BT_EMPTY_ALGORITH
 #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
 #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
 #include "btCollisionCreateFunc.h"
 #include "btCollisionCreateFunc.h"
 #include "btCollisionDispatcher.h"
 #include "btCollisionDispatcher.h"
@@ -51,4 +51,4 @@ public:
 
 
 } ATTRIBUTE_ALIGNED(16);
 } ATTRIBUTE_ALIGNED(16);
 
 
-#endif //EMPTY_ALGORITH
+#endif //BT_EMPTY_ALGORITH

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionDispatch/btManifoldResult.h

@@ -14,8 +14,8 @@ subject to the following restrictions:
 */
 */
 
 
 
 
-#ifndef MANIFOLD_RESULT_H
-#define MANIFOLD_RESULT_H
+#ifndef BT_MANIFOLD_RESULT_H
+#define BT_MANIFOLD_RESULT_H
 
 
 class btCollisionObject;
 class btCollisionObject;
 #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
 #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
@@ -125,4 +125,4 @@ public:
 	
 	
 };
 };
 
 
-#endif //MANIFOLD_RESULT_H
+#endif //BT_MANIFOLD_RESULT_H

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionDispatch/btSimulationIslandManager.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef SIMULATION_ISLAND_MANAGER_H
-#define SIMULATION_ISLAND_MANAGER_H
+#ifndef BT_SIMULATION_ISLAND_MANAGER_H
+#define BT_SIMULATION_ISLAND_MANAGER_H
 
 
 #include "BulletCollision/CollisionDispatch/btUnionFind.h"
 #include "BulletCollision/CollisionDispatch/btUnionFind.h"
 #include "btCollisionCreateFunc.h"
 #include "btCollisionCreateFunc.h"
@@ -77,5 +77,5 @@ public:
 
 
 };
 };
 
 
-#endif //SIMULATION_ISLAND_MANAGER_H
+#endif //BT_SIMULATION_ISLAND_MANAGER_H
 
 

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef SPHERE_BOX_COLLISION_ALGORITHM_H
-#define SPHERE_BOX_COLLISION_ALGORITHM_H
+#ifndef BT_SPHERE_BOX_COLLISION_ALGORITHM_H
+#define BT_SPHERE_BOX_COLLISION_ALGORITHM_H
 
 
 #include "btActivatingCollisionAlgorithm.h"
 #include "btActivatingCollisionAlgorithm.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
@@ -71,5 +71,5 @@ public:
 
 
 };
 };
 
 
-#endif //SPHERE_BOX_COLLISION_ALGORITHM_H
+#endif //BT_SPHERE_BOX_COLLISION_ALGORITHM_H
 
 

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef SPHERE_SPHERE_COLLISION_ALGORITHM_H
-#define SPHERE_SPHERE_COLLISION_ALGORITHM_H
+#ifndef BT_SPHERE_SPHERE_COLLISION_ALGORITHM_H
+#define BT_SPHERE_SPHERE_COLLISION_ALGORITHM_H
 
 
 #include "btActivatingCollisionAlgorithm.h"
 #include "btActivatingCollisionAlgorithm.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
@@ -62,5 +62,5 @@ public:
 
 
 };
 };
 
 
-#endif //SPHERE_SPHERE_COLLISION_ALGORITHM_H
+#endif //BT_SPHERE_SPHERE_COLLISION_ALGORITHM_H
 
 

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef SPHERE_TRIANGLE_COLLISION_ALGORITHM_H
-#define SPHERE_TRIANGLE_COLLISION_ALGORITHM_H
+#ifndef BT_SPHERE_TRIANGLE_COLLISION_ALGORITHM_H
+#define BT_SPHERE_TRIANGLE_COLLISION_ALGORITHM_H
 
 
 #include "btActivatingCollisionAlgorithm.h"
 #include "btActivatingCollisionAlgorithm.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
@@ -65,5 +65,5 @@ public:
 
 
 };
 };
 
 
-#endif //SPHERE_TRIANGLE_COLLISION_ALGORITHM_H
+#endif //BT_SPHERE_TRIANGLE_COLLISION_ALGORITHM_H
 
 

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionDispatch/btUnionFind.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef UNION_FIND_H
-#define UNION_FIND_H
+#ifndef BT_UNION_FIND_H
+#define BT_UNION_FIND_H
 
 
 #include "LinearMath/btAlignedObjectArray.h"
 #include "LinearMath/btAlignedObjectArray.h"
 
 
@@ -126,4 +126,4 @@ class btUnionFind
   };
   };
 
 
 
 
-#endif //UNION_FIND_H
+#endif //BT_UNION_FIND_H

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btBox2dShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef OBB_BOX_2D_SHAPE_H
-#define OBB_BOX_2D_SHAPE_H
+#ifndef BT_OBB_BOX_2D_SHAPE_H
+#define BT_OBB_BOX_2D_SHAPE_H
 
 
 #include "BulletCollision/CollisionShapes/btPolyhedralConvexShape.h"
 #include "BulletCollision/CollisionShapes/btPolyhedralConvexShape.h"
 #include "BulletCollision/CollisionShapes/btCollisionMargin.h"
 #include "BulletCollision/CollisionShapes/btCollisionMargin.h"
@@ -358,6 +358,6 @@ public:
 
 
 };
 };
 
 
-#endif //OBB_BOX_2D_SHAPE_H
+#endif //BT_OBB_BOX_2D_SHAPE_H
 
 
 
 

+ 4 - 4
extern/include/bullet/BulletCollision/CollisionShapes/btBoxShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef OBB_BOX_MINKOWSKI_H
-#define OBB_BOX_MINKOWSKI_H
+#ifndef BT_OBB_BOX_MINKOWSKI_H
+#define BT_OBB_BOX_MINKOWSKI_H
 
 
 #include "btPolyhedralConvexShape.h"
 #include "btPolyhedralConvexShape.h"
 #include "btCollisionMargin.h"
 #include "btCollisionMargin.h"
@@ -145,7 +145,7 @@ public:
 
 
 	virtual void getVertex(int i,btVector3& vtx) const
 	virtual void getVertex(int i,btVector3& vtx) const
 	{
 	{
-		btVector3 halfExtents = getHalfExtentsWithoutMargin();
+		btVector3 halfExtents = getHalfExtentsWithMargin();
 
 
 		vtx = btVector3(
 		vtx = btVector3(
 				halfExtents.x() * (1-(i&1)) - halfExtents.x() * (i&1),
 				halfExtents.x() * (1-(i&1)) - halfExtents.x() * (i&1),
@@ -313,6 +313,6 @@ public:
 };
 };
 
 
 
 
-#endif //OBB_BOX_MINKOWSKI_H
+#endif //BT_OBB_BOX_MINKOWSKI_H
 
 
 
 

+ 4 - 4
extern/include/bullet/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef BVH_TRIANGLE_MESH_SHAPE_H
-#define BVH_TRIANGLE_MESH_SHAPE_H
+#ifndef BT_BVH_TRIANGLE_MESH_SHAPE_H
+#define BT_BVH_TRIANGLE_MESH_SHAPE_H
 
 
 #include "btTriangleMeshShape.h"
 #include "btTriangleMeshShape.h"
 #include "btOptimizedBvh.h"
 #include "btOptimizedBvh.h"
@@ -39,7 +39,7 @@ public:
 
 
 	BT_DECLARE_ALIGNED_ALLOCATOR();
 	BT_DECLARE_ALIGNED_ALLOCATOR();
 
 
-	btBvhTriangleMeshShape() : btTriangleMeshShape(0),m_bvh(0),m_triangleInfoMap(0),m_ownsBvh(false) {m_shapeType = TRIANGLE_MESH_SHAPE_PROXYTYPE;};
+	
 	btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh = true);
 	btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh = true);
 
 
 	///optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb
 	///optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb
@@ -136,4 +136,4 @@ SIMD_FORCE_INLINE	int	btBvhTriangleMeshShape::calculateSerializeBufferSize() con
 
 
 
 
 
 
-#endif //BVH_TRIANGLE_MESH_SHAPE_H
+#endif //BT_BVH_TRIANGLE_MESH_SHAPE_H

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btCollisionMargin.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef COLLISION_MARGIN_H
-#define COLLISION_MARGIN_H
+#ifndef BT_COLLISION_MARGIN_H
+#define BT_COLLISION_MARGIN_H
 
 
 //used by Gjk and some other algorithms
 //used by Gjk and some other algorithms
 
 
@@ -22,5 +22,5 @@ subject to the following restrictions:
 
 
 
 
 
 
-#endif //COLLISION_MARGIN_H
+#endif //BT_COLLISION_MARGIN_H
 
 

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btCollisionShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef COLLISION_SHAPE_H
-#define COLLISION_SHAPE_H
+#ifndef BT_COLLISION_SHAPE_H
+#define BT_COLLISION_SHAPE_H
 
 
 #include "LinearMath/btTransform.h"
 #include "LinearMath/btTransform.h"
 #include "LinearMath/btVector3.h"
 #include "LinearMath/btVector3.h"
@@ -146,5 +146,5 @@ SIMD_FORCE_INLINE	int	btCollisionShape::calculateSerializeBufferSize() const
 
 
 
 
 
 
-#endif //COLLISION_SHAPE_H
+#endif //BT_COLLISION_SHAPE_H
 
 

+ 10 - 6
extern/include/bullet/BulletCollision/CollisionShapes/btCompoundShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef COMPOUND_SHAPE_H
-#define COMPOUND_SHAPE_H
+#ifndef BT_COMPOUND_SHAPE_H
+#define BT_COMPOUND_SHAPE_H
 
 
 #include "btCollisionShape.h"
 #include "btCollisionShape.h"
 
 
@@ -106,7 +106,7 @@ public:
 	}
 	}
 
 
 	///set a new transform for a child, and update internal data structures (local aabb and dynamic tree)
 	///set a new transform for a child, and update internal data structures (local aabb and dynamic tree)
-	void	updateChildTransform(int childIndex, const btTransform& newChildTransform);
+	void	updateChildTransform(int childIndex, const btTransform& newChildTransform, bool shouldRecalculateLocalAabb = true);
 
 
 
 
 	btCompoundShapeChild* getChildList()
 	btCompoundShapeChild* getChildList()
@@ -143,8 +143,12 @@ public:
 		return "Compound";
 		return "Compound";
 	}
 	}
 
 
-
-	btDbvt*							getDynamicAabbTree()
+	const btDbvt*	getDynamicAabbTree() const
+	{
+		return m_dynamicAabbTree;
+	}
+	
+	btDbvt*	getDynamicAabbTree()
 	{
 	{
 		return m_dynamicAabbTree;
 		return m_dynamicAabbTree;
 	}
 	}
@@ -205,4 +209,4 @@ SIMD_FORCE_INLINE	int	btCompoundShape::calculateSerializeBufferSize() const
 
 
 
 
 
 
-#endif //COMPOUND_SHAPE_H
+#endif //BT_COMPOUND_SHAPE_H

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btConcaveShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef CONCAVE_SHAPE_H
-#define CONCAVE_SHAPE_H
+#ifndef BT_CONCAVE_SHAPE_H
+#define BT_CONCAVE_SHAPE_H
 
 
 #include "btCollisionShape.h"
 #include "btCollisionShape.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
@@ -57,4 +57,4 @@ public:
 
 
 };
 };
 
 
-#endif //CONCAVE_SHAPE_H
+#endif //BT_CONCAVE_SHAPE_H

+ 6 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btConeShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef CONE_MINKOWSKI_H
-#define CONE_MINKOWSKI_H
+#ifndef BT_CONE_MINKOWSKI_H
+#define BT_CONE_MINKOWSKI_H
 
 
 #include "btConvexInternalShape.h"
 #include "btConvexInternalShape.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
@@ -81,6 +81,9 @@ public:
 		{
 		{
 			return m_coneIndices[1];
 			return m_coneIndices[1];
 		}
 		}
+
+	virtual void	setLocalScaling(const btVector3& scaling);
+
 };
 };
 
 
 ///btConeShape implements a Cone shape, around the X axis
 ///btConeShape implements a Cone shape, around the X axis
@@ -96,5 +99,5 @@ class btConeShapeZ : public btConeShape
 	public:
 	public:
 		btConeShapeZ(btScalar radius,btScalar height);
 		btConeShapeZ(btScalar radius,btScalar height);
 };
 };
-#endif //CONE_MINKOWSKI_H
+#endif //BT_CONE_MINKOWSKI_H
 
 

+ 1 - 1
extern/include/bullet/BulletCollision/CollisionShapes/btConvex2dShape.h

@@ -19,7 +19,7 @@ subject to the following restrictions:
 #include "BulletCollision/CollisionShapes/btConvexShape.h"
 #include "BulletCollision/CollisionShapes/btConvexShape.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
 
 
-///The btConvex2dShape allows to use arbitrary convex shapes are 2d convex shapes, with the Z component assumed to be 0.
+///The btConvex2dShape allows to use arbitrary convex shapes as 2d convex shapes, with the Z component assumed to be 0.
 ///For 2d boxes, the btBox2dShape is recommended.
 ///For 2d boxes, the btBox2dShape is recommended.
 class btConvex2dShape : public btConvexShape
 class btConvex2dShape : public btConvexShape
 {
 {

+ 5 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btConvexHullShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef CONVEX_HULL_SHAPE_H
-#define CONVEX_HULL_SHAPE_H
+#ifndef BT_CONVEX_HULL_SHAPE_H
+#define BT_CONVEX_HULL_SHAPE_H
 
 
 #include "btPolyhedralConvexShape.h"
 #include "btPolyhedralConvexShape.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
@@ -73,6 +73,8 @@ public:
 	virtual void	batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
 	virtual void	batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
 	
 	
 
 
+	virtual void project(const btTransform& trans, const btVector3& dir, float& min, float& max) const;
+
 
 
 	//debugging
 	//debugging
 	virtual const char*	getName()const {return "Convex";}
 	virtual const char*	getName()const {return "Convex";}
@@ -116,5 +118,5 @@ SIMD_FORCE_INLINE	int	btConvexHullShape::calculateSerializeBufferSize() const
 }
 }
 
 
 
 
-#endif //CONVEX_HULL_SHAPE_H
+#endif //BT_CONVEX_HULL_SHAPE_H
 
 

+ 62 - 0
extern/include/bullet/BulletCollision/CollisionShapes/btConvexPolyhedron.h

@@ -0,0 +1,62 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2011 Advanced Micro Devices, Inc.  http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose, 
+including commercial applications, and to alter it and redistribute it freely, 
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+///This file was written by Erwin Coumans
+
+
+#ifndef _BT_POLYHEDRAL_FEATURES_H
+#define _BT_POLYHEDRAL_FEATURES_H
+
+#include "LinearMath/btTransform.h"
+#include "LinearMath/btAlignedObjectArray.h"
+
+#define TEST_INTERNAL_OBJECTS 1
+
+
+struct btFace
+{
+	btAlignedObjectArray<int>	m_indices;
+//	btAlignedObjectArray<int>	m_connectedFaces;
+	btScalar	m_plane[4];
+};
+
+
+class btConvexPolyhedron
+{
+	public:
+	btConvexPolyhedron();
+	virtual	~btConvexPolyhedron();
+
+	btAlignedObjectArray<btVector3>	m_vertices;
+	btAlignedObjectArray<btFace>	m_faces;
+	btAlignedObjectArray<btVector3> m_uniqueEdges;
+
+	btVector3		m_localCenter;
+	btVector3		m_extents;
+	btScalar		m_radius;
+	btVector3		mC;
+	btVector3		mE;
+
+	void	initialize();
+	bool testContainment() const;
+
+	void project(const btTransform& trans, const btVector3& dir, btScalar& min, btScalar& max) const;
+};
+
+	
+#endif //_BT_POLYHEDRAL_FEATURES_H
+
+

+ 5 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btConvexShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef CONVEX_SHAPE_INTERFACE1
-#define CONVEX_SHAPE_INTERFACE1
+#ifndef BT_CONVEX_SHAPE_INTERFACE1
+#define BT_CONVEX_SHAPE_INTERFACE1
 
 
 #include "btCollisionShape.h"
 #include "btCollisionShape.h"
 
 
@@ -52,6 +52,8 @@ public:
 	btScalar getMarginNonVirtual () const;
 	btScalar getMarginNonVirtual () const;
 	void getAabbNonVirtual (const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const;
 	void getAabbNonVirtual (const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const;
 
 
+	virtual void project(const btTransform& trans, const btVector3& dir, float& min, float& max) const;
+
 	
 	
 	//notice that the vectors should be unit length
 	//notice that the vectors should be unit length
 	virtual void	batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const= 0;
 	virtual void	batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const= 0;
@@ -79,4 +81,4 @@ public:
 
 
 
 
 
 
-#endif //CONVEX_SHAPE_INTERFACE1
+#endif //BT_CONVEX_SHAPE_INTERFACE1

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h

@@ -12,8 +12,8 @@ subject to the following restrictions:
 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
-#ifndef CONVEX_TRIANGLEMESH_SHAPE_H
-#define CONVEX_TRIANGLEMESH_SHAPE_H
+#ifndef BT_CONVEX_TRIANGLEMESH_SHAPE_H
+#define BT_CONVEX_TRIANGLEMESH_SHAPE_H
 
 
 
 
 #include "btPolyhedralConvexShape.h"
 #include "btPolyhedralConvexShape.h"
@@ -69,7 +69,7 @@ public:
 
 
 
 
 
 
-#endif //CONVEX_TRIANGLEMESH_SHAPE_H
+#endif //BT_CONVEX_TRIANGLEMESH_SHAPE_H
 
 
 
 
 
 

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btCylinderShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef CYLINDER_MINKOWSKI_H
-#define CYLINDER_MINKOWSKI_H
+#ifndef BT_CYLINDER_MINKOWSKI_H
+#define BT_CYLINDER_MINKOWSKI_H
 
 
 #include "btBoxShape.h"
 #include "btBoxShape.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
@@ -196,5 +196,5 @@ SIMD_FORCE_INLINE	const char*	btCylinderShape::serialize(void* dataBuffer, btSer
 
 
 
 
 
 
-#endif //CYLINDER_MINKOWSKI_H
+#endif //BT_CYLINDER_MINKOWSKI_H
 
 

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btEmptyShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef EMPTY_SHAPE_H
-#define EMPTY_SHAPE_H
+#ifndef BT_EMPTY_SHAPE_H
+#define BT_EMPTY_SHAPE_H
 
 
 #include "btConcaveShape.h"
 #include "btConcaveShape.h"
 
 
@@ -67,4 +67,4 @@ protected:
 
 
 
 
 
 
-#endif //EMPTY_SHAPE_H
+#endif //BT_EMPTY_SHAPE_H

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef HEIGHTFIELD_TERRAIN_SHAPE_H
-#define HEIGHTFIELD_TERRAIN_SHAPE_H
+#ifndef BT_HEIGHTFIELD_TERRAIN_SHAPE_H
+#define BT_HEIGHTFIELD_TERRAIN_SHAPE_H
 
 
 #include "btConcaveShape.h"
 #include "btConcaveShape.h"
 
 
@@ -158,4 +158,4 @@ public:
 
 
 };
 };
 
 
-#endif //HEIGHTFIELD_TERRAIN_SHAPE_H
+#endif //BT_HEIGHTFIELD_TERRAIN_SHAPE_H

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btMaterial.h

@@ -15,8 +15,8 @@ subject to the following restrictions:
 
 
 /// This file was created by Alex Silverman
 /// This file was created by Alex Silverman
 
 
-#ifndef MATERIAL_H
-#define MATERIAL_H
+#ifndef BT_MATERIAL_H
+#define BT_MATERIAL_H
 
 
 // Material class to be used by btMultimaterialTriangleMeshShape to store triangle properties
 // Material class to be used by btMultimaterialTriangleMeshShape to store triangle properties
 class btMaterial
 class btMaterial
@@ -31,5 +31,5 @@ public:
     btMaterial(btScalar fric, btScalar rest) { m_friction = fric; m_restitution = rest; }
     btMaterial(btScalar fric, btScalar rest) { m_friction = fric; m_restitution = rest; }
 };
 };
 
 
-#endif // MATERIAL_H
+#endif // BT_MATERIAL_H
 
 

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btMinkowskiSumShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef MINKOWSKI_SUM_SHAPE_H
-#define MINKOWSKI_SUM_SHAPE_H
+#ifndef BT_MINKOWSKI_SUM_SHAPE_H
+#define BT_MINKOWSKI_SUM_SHAPE_H
 
 
 #include "btConvexInternalShape.h"
 #include "btConvexInternalShape.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
@@ -57,4 +57,4 @@ public:
 	}
 	}
 };
 };
 
 
-#endif //MINKOWSKI_SUM_SHAPE_H
+#endif //BT_MINKOWSKI_SUM_SHAPE_H

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btMultiSphereShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef MULTI_SPHERE_MINKOWSKI_H
-#define MULTI_SPHERE_MINKOWSKI_H
+#ifndef BT_MULTI_SPHERE_MINKOWSKI_H
+#define BT_MULTI_SPHERE_MINKOWSKI_H
 
 
 #include "btConvexInternalShape.h"
 #include "btConvexInternalShape.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
@@ -96,4 +96,4 @@ SIMD_FORCE_INLINE	int	btMultiSphereShape::calculateSerializeBufferSize() const
 
 
 
 
 
 
-#endif //MULTI_SPHERE_MINKOWSKI_H
+#endif //BT_MULTI_SPHERE_MINKOWSKI_H

+ 3 - 4
extern/include/bullet/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h

@@ -15,8 +15,8 @@ subject to the following restrictions:
 
 
 /// This file was created by Alex Silverman
 /// This file was created by Alex Silverman
 
 
-#ifndef BVH_TRIANGLE_MATERIAL_MESH_SHAPE_H
-#define BVH_TRIANGLE_MATERIAL_MESH_SHAPE_H
+#ifndef BT_BVH_TRIANGLE_MATERIAL_MESH_SHAPE_H
+#define BT_BVH_TRIANGLE_MATERIAL_MESH_SHAPE_H
 
 
 #include "btBvhTriangleMeshShape.h"
 #include "btBvhTriangleMeshShape.h"
 #include "btMaterial.h"
 #include "btMaterial.h"
@@ -31,7 +31,6 @@ public:
 
 
 	BT_DECLARE_ALIGNED_ALLOCATOR();
 	BT_DECLARE_ALIGNED_ALLOCATOR();
 
 
-    btMultimaterialTriangleMeshShape(): btBvhTriangleMeshShape() {m_shapeType = MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE;}
     btMultimaterialTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh = true):
     btMultimaterialTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh = true):
         btBvhTriangleMeshShape(meshInterface, useQuantizedAabbCompression, buildBvh)
         btBvhTriangleMeshShape(meshInterface, useQuantizedAabbCompression, buildBvh)
         {
         {
@@ -118,4 +117,4 @@ public:
 }
 }
 ;
 ;
 
 
-#endif //BVH_TRIANGLE_MATERIAL_MESH_SHAPE_H
+#endif //BT_BVH_TRIANGLE_MATERIAL_MESH_SHAPE_H

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btOptimizedBvh.h

@@ -15,8 +15,8 @@ subject to the following restrictions:
 
 
 ///Contains contributions from Disney Studio's
 ///Contains contributions from Disney Studio's
 
 
-#ifndef OPTIMIZED_BVH_H
-#define OPTIMIZED_BVH_H
+#ifndef BT_OPTIMIZED_BVH_H
+#define BT_OPTIMIZED_BVH_H
 
 
 #include "BulletCollision/BroadphaseCollision/btQuantizedBvh.h"
 #include "BulletCollision/BroadphaseCollision/btQuantizedBvh.h"
 
 
@@ -60,6 +60,6 @@ public:
 };
 };
 
 
 
 
-#endif //OPTIMIZED_BVH_H
+#endif //BT_OPTIMIZED_BVH_H
 
 
 
 

+ 17 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h

@@ -13,23 +13,37 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef BU_SHAPE
-#define BU_SHAPE
+#ifndef BT_POLYHEDRAL_CONVEX_SHAPE_H
+#define BT_POLYHEDRAL_CONVEX_SHAPE_H
 
 
 #include "LinearMath/btMatrix3x3.h"
 #include "LinearMath/btMatrix3x3.h"
 #include "btConvexInternalShape.h"
 #include "btConvexInternalShape.h"
+class btConvexPolyhedron;
 
 
 
 
 ///The btPolyhedralConvexShape is an internal interface class for polyhedral convex shapes.
 ///The btPolyhedralConvexShape is an internal interface class for polyhedral convex shapes.
 class btPolyhedralConvexShape : public btConvexInternalShape
 class btPolyhedralConvexShape : public btConvexInternalShape
 {
 {
+	
 
 
 protected:
 protected:
 	
 	
+	btConvexPolyhedron* m_polyhedron;
+
 public:
 public:
 
 
 	btPolyhedralConvexShape();
 	btPolyhedralConvexShape();
 
 
+	virtual ~btPolyhedralConvexShape();
+
+	///optional method mainly used to generate multiple contact points by clipping polyhedral features (faces/edges)
+	virtual bool	initializePolyhedralFeatures();
+
+	const btConvexPolyhedron*	getConvexPolyhedron() const
+	{
+		return m_polyhedron;
+	}
+
 	//brute force implementations
 	//brute force implementations
 
 
 	virtual btVector3	localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
 	virtual btVector3	localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
@@ -95,4 +109,4 @@ public:
 
 
 };
 };
 
 
-#endif //BU_SHAPE
+#endif //BT_POLYHEDRAL_CONVEX_SHAPE_H

+ 34 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef SCALED_BVH_TRIANGLE_MESH_SHAPE_H
-#define SCALED_BVH_TRIANGLE_MESH_SHAPE_H
+#ifndef BT_SCALED_BVH_TRIANGLE_MESH_SHAPE_H
+#define BT_SCALED_BVH_TRIANGLE_MESH_SHAPE_H
 
 
 #include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"
 #include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"
 
 
@@ -57,6 +57,37 @@ public:
 	//debugging
 	//debugging
 	virtual const char*	getName()const {return "SCALEDBVHTRIANGLEMESH";}
 	virtual const char*	getName()const {return "SCALEDBVHTRIANGLEMESH";}
 
 
+	virtual	int	calculateSerializeBufferSize() const;
+
+	///fills the dataBuffer and returns the struct name (and 0 on failure)
+	virtual	const char*	serialize(void* dataBuffer, btSerializer* serializer) const;
+
 };
 };
 
 
-#endif //BVH_TRIANGLE_MESH_SHAPE_H
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct	btScaledTriangleMeshShapeData
+{
+	btTriangleMeshShapeData	m_trimeshShapeData;
+
+	btVector3FloatData	m_localScaling;
+};
+
+
+SIMD_FORCE_INLINE	int	btScaledBvhTriangleMeshShape::calculateSerializeBufferSize() const
+{
+	return sizeof(btScaledTriangleMeshShapeData);
+}
+
+
+///fills the dataBuffer and returns the struct name (and 0 on failure)
+SIMD_FORCE_INLINE	const char*	btScaledBvhTriangleMeshShape::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+	btScaledTriangleMeshShapeData* scaledMeshData = (btScaledTriangleMeshShapeData*) dataBuffer;
+	m_bvhTriMeshShape->serialize(&scaledMeshData->m_trimeshShapeData,serializer);
+	scaledMeshData->m_trimeshShapeData.m_collisionShapeData.m_shapeType = SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE;
+	m_localScaling.serializeFloat(scaledMeshData->m_localScaling);
+	return "btScaledTriangleMeshShapeData";
+}
+
+
+#endif //BT_SCALED_BVH_TRIANGLE_MESH_SHAPE_H

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btShapeHull.h

@@ -15,8 +15,8 @@ subject to the following restrictions:
 
 
 ///btShapeHull implemented by John McCutchan.
 ///btShapeHull implemented by John McCutchan.
 
 
-#ifndef _SHAPE_HULL_H
-#define _SHAPE_HULL_H
+#ifndef BT_SHAPE_HULL_H
+#define BT_SHAPE_HULL_H
 
 
 #include "LinearMath/btAlignedObjectArray.h"
 #include "LinearMath/btAlignedObjectArray.h"
 #include "BulletCollision/CollisionShapes/btConvexShape.h"
 #include "BulletCollision/CollisionShapes/btConvexShape.h"
@@ -56,4 +56,4 @@ public:
 	}
 	}
 };
 };
 
 
-#endif //_SHAPE_HULL_H
+#endif //BT_SHAPE_HULL_H

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btSphereShape.h

@@ -12,8 +12,8 @@ subject to the following restrictions:
 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
-#ifndef SPHERE_MINKOWSKI_H
-#define SPHERE_MINKOWSKI_H
+#ifndef BT_SPHERE_MINKOWSKI_H
+#define BT_SPHERE_MINKOWSKI_H
 
 
 #include "btConvexInternalShape.h"
 #include "btConvexInternalShape.h"
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
@@ -70,4 +70,4 @@ public:
 };
 };
 
 
 
 
-#endif //SPHERE_MINKOWSKI_H
+#endif //BT_SPHERE_MINKOWSKI_H

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btStaticPlaneShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef STATIC_PLANE_SHAPE_H
-#define STATIC_PLANE_SHAPE_H
+#ifndef BT_STATIC_PLANE_SHAPE_H
+#define BT_STATIC_PLANE_SHAPE_H
 
 
 #include "btConcaveShape.h"
 #include "btConcaveShape.h"
 
 
@@ -97,7 +97,7 @@ SIMD_FORCE_INLINE	const char*	btStaticPlaneShape::serialize(void* dataBuffer, bt
 }
 }
 
 
 
 
-#endif //STATIC_PLANE_SHAPE_H
+#endif //BT_STATIC_PLANE_SHAPE_H
 
 
 
 
 
 

+ 11 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btStridingMeshInterface.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef STRIDING_MESHINTERFACE_H
-#define STRIDING_MESHINTERFACE_H
+#ifndef BT_STRIDING_MESHINTERFACE_H
+#define BT_STRIDING_MESHINTERFACE_H
 
 
 #include "LinearMath/btVector3.h"
 #include "LinearMath/btVector3.h"
 #include "btTriangleCallback.h"
 #include "btTriangleCallback.h"
@@ -116,6 +116,13 @@ struct	btShortIntIndexTripletData
 	char	m_pad[2];
 	char	m_pad[2];
 };
 };
 
 
+struct	btCharIndexTripletData
+{
+	unsigned char m_values[3];
+	char	m_pad;
+};
+
+
 ///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
 ///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
 struct	btMeshPartData
 struct	btMeshPartData
 {
 {
@@ -124,6 +131,7 @@ struct	btMeshPartData
 
 
 	btIntIndexData				*m_indices32;
 	btIntIndexData				*m_indices32;
 	btShortIntIndexTripletData	*m_3indices16;
 	btShortIntIndexTripletData	*m_3indices16;
+	btCharIndexTripletData		*m_3indices8;
 
 
 	btShortIntIndexData			*m_indices16;//backwards compatibility
 	btShortIntIndexData			*m_indices16;//backwards compatibility
 
 
@@ -151,4 +159,4 @@ SIMD_FORCE_INLINE	int	btStridingMeshInterface::calculateSerializeBufferSize() co
 
 
 
 
 
 
-#endif //STRIDING_MESHINTERFACE_H
+#endif //BT_STRIDING_MESHINTERFACE_H

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btTetrahedronShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef BU_SIMPLEX_1TO4_SHAPE
-#define BU_SIMPLEX_1TO4_SHAPE
+#ifndef BT_SIMPLEX_1TO4_SHAPE
+#define BT_SIMPLEX_1TO4_SHAPE
 
 
 
 
 #include "btPolyhedralConvexShape.h"
 #include "btPolyhedralConvexShape.h"
@@ -71,4 +71,4 @@ public:
 
 
 };
 };
 
 
-#endif //BU_SIMPLEX_1TO4_SHAPE
+#endif //BT_SIMPLEX_1TO4_SHAPE

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btTriangleCallback.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef TRIANGLE_CALLBACK_H
-#define TRIANGLE_CALLBACK_H
+#ifndef BT_TRIANGLE_CALLBACK_H
+#define BT_TRIANGLE_CALLBACK_H
 
 
 #include "LinearMath/btVector3.h"
 #include "LinearMath/btVector3.h"
 
 
@@ -39,4 +39,4 @@ public:
 
 
 
 
 
 
-#endif //TRIANGLE_CALLBACK_H
+#endif //BT_TRIANGLE_CALLBACK_H

+ 2 - 0
extern/include/bullet/BulletCollision/CollisionShapes/btTriangleInfoMap.h

@@ -61,6 +61,7 @@ struct	btTriangleInfoMap : public btInternalTriangleInfoMap
 	btScalar	m_planarEpsilon; ///used to determine if a triangle edge is planar with zero angle
 	btScalar	m_planarEpsilon; ///used to determine if a triangle edge is planar with zero angle
 	btScalar	m_equalVertexThreshold; ///used to compute connectivity: if the distance between two vertices is smaller than m_equalVertexThreshold, they are considered to be 'shared'
 	btScalar	m_equalVertexThreshold; ///used to compute connectivity: if the distance between two vertices is smaller than m_equalVertexThreshold, they are considered to be 'shared'
 	btScalar	m_edgeDistanceThreshold; ///used to determine edge contacts: if the closest distance between a contact point and an edge is smaller than this distance threshold it is considered to "hit the edge"
 	btScalar	m_edgeDistanceThreshold; ///used to determine edge contacts: if the closest distance between a contact point and an edge is smaller than this distance threshold it is considered to "hit the edge"
+	btScalar	m_maxEdgeAngleThreshold; //ignore edges that connect triangles at an angle larger than this m_maxEdgeAngleThreshold
 	btScalar	m_zeroAreaThreshold; ///used to determine if a triangle is degenerate (length squared of cross product of 2 triangle edges < threshold)
 	btScalar	m_zeroAreaThreshold; ///used to determine if a triangle is degenerate (length squared of cross product of 2 triangle edges < threshold)
 	
 	
 	
 	
@@ -71,6 +72,7 @@ struct	btTriangleInfoMap : public btInternalTriangleInfoMap
 		m_equalVertexThreshold = btScalar(0.0001)*btScalar(0.0001);
 		m_equalVertexThreshold = btScalar(0.0001)*btScalar(0.0001);
 		m_edgeDistanceThreshold = btScalar(0.1);
 		m_edgeDistanceThreshold = btScalar(0.1);
 		m_zeroAreaThreshold = btScalar(0.0001)*btScalar(0.0001);
 		m_zeroAreaThreshold = btScalar(0.0001)*btScalar(0.0001);
+		m_maxEdgeAngleThreshold = SIMD_2_PI;
 	}
 	}
 	virtual ~btTriangleInfoMap() {}
 	virtual ~btTriangleInfoMap() {}
 
 

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btTriangleMesh.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef TRIANGLE_MESH_H
-#define TRIANGLE_MESH_H
+#ifndef BT_TRIANGLE_MESH_H
+#define BT_TRIANGLE_MESH_H
 
 
 #include "btTriangleIndexVertexArray.h"
 #include "btTriangleIndexVertexArray.h"
 #include "LinearMath/btVector3.h"
 #include "LinearMath/btVector3.h"
@@ -65,5 +65,5 @@ class btTriangleMesh : public btTriangleIndexVertexArray
 		
 		
 };
 };
 
 
-#endif //TRIANGLE_MESH_H
+#endif //BT_TRIANGLE_MESH_H
 
 

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btTriangleMeshShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef TRIANGLE_MESH_SHAPE_H
-#define TRIANGLE_MESH_SHAPE_H
+#ifndef BT_TRIANGLE_MESH_SHAPE_H
+#define BT_TRIANGLE_MESH_SHAPE_H
 
 
 #include "btConcaveShape.h"
 #include "btConcaveShape.h"
 #include "btStridingMeshInterface.h"
 #include "btStridingMeshInterface.h"
@@ -86,4 +86,4 @@ public:
 
 
 
 
 
 
-#endif //TRIANGLE_MESH_SHAPE_H
+#endif //BT_TRIANGLE_MESH_SHAPE_H

+ 3 - 3
extern/include/bullet/BulletCollision/CollisionShapes/btTriangleShape.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef OBB_TRIANGLE_MINKOWSKI_H
-#define OBB_TRIANGLE_MINKOWSKI_H
+#ifndef BT_OBB_TRIANGLE_MINKOWSKI_H
+#define BT_OBB_TRIANGLE_MINKOWSKI_H
 
 
 #include "btConvexShape.h"
 #include "btConvexShape.h"
 #include "btBoxShape.h"
 #include "btBoxShape.h"
@@ -178,5 +178,5 @@ public:
 
 
 };
 };
 
 
-#endif //OBB_TRIANGLE_MINKOWSKI_H
+#endif //BT_OBB_TRIANGLE_MINKOWSKI_H
 
 

+ 2 - 2
extern/include/bullet/BulletCollision/Gimpact/btGImpactBvh.h

@@ -383,9 +383,9 @@ public:
 		return m_box_tree.get_node_pointer(index);
 		return m_box_tree.get_node_pointer(index);
 	}
 	}
 
 
-
+#ifdef TRI_COLLISION_PROFILING
 	static float getAverageTreeCollisionTime();
 	static float getAverageTreeCollisionTime();
-
+#endif //TRI_COLLISION_PROFILING
 
 
 	static void find_collision(btGImpactBvh * boxset1, const btTransform & trans1,
 	static void find_collision(btGImpactBvh * boxset1, const btTransform & trans1,
 		btGImpactBvh * boxset2, const btTransform & trans2,
 		btGImpactBvh * boxset2, const btTransform & trans2,

+ 5 - 5
extern/include/bullet/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h

@@ -21,8 +21,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef BVH_CONCAVE_COLLISION_ALGORITHM_H
-#define BVH_CONCAVE_COLLISION_ALGORITHM_H
+#ifndef BT_GIMPACT_BVH_CONCAVE_COLLISION_ALGORITHM_H
+#define BT_GIMPACT_BVH_CONCAVE_COLLISION_ALGORITHM_H
 
 
 #include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h"
 #include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h"
 #include "BulletCollision/BroadphaseCollision/btDispatcher.h"
 #include "BulletCollision/BroadphaseCollision/btDispatcher.h"
@@ -222,13 +222,13 @@ public:
 
 
 	//! Use this function for register the algorithm externally
 	//! Use this function for register the algorithm externally
 	static void registerAlgorithm(btCollisionDispatcher * dispatcher);
 	static void registerAlgorithm(btCollisionDispatcher * dispatcher);
-
+#ifdef TRI_COLLISION_PROFILING
 	//! Gets the average time in miliseconds of tree collisions
 	//! Gets the average time in miliseconds of tree collisions
 	static float getAverageTreeCollisionTime();
 	static float getAverageTreeCollisionTime();
 
 
 	//! Gets the average time in miliseconds of triangle collisions
 	//! Gets the average time in miliseconds of triangle collisions
 	static float getAverageTriangleCollisionTime();
 	static float getAverageTriangleCollisionTime();
-
+#endif //TRI_COLLISION_PROFILING
 
 
 	//! Collides two gimpact shapes
 	//! Collides two gimpact shapes
 	/*!
 	/*!
@@ -303,4 +303,4 @@ public:
 
 
 
 
 
 
-#endif //BVH_CONCAVE_COLLISION_ALGORITHM_H
+#endif //BT_GIMPACT_BVH_CONCAVE_COLLISION_ALGORITHM_H

+ 2 - 2
extern/include/bullet/BulletCollision/Gimpact/btGImpactQuantizedBvh.h

@@ -359,9 +359,9 @@ public:
 		return m_box_tree.get_node_pointer(index);
 		return m_box_tree.get_node_pointer(index);
 	}
 	}
 
 
-
+#ifdef TRI_COLLISION_PROFILING
 	static float getAverageTreeCollisionTime();
 	static float getAverageTreeCollisionTime();
-
+#endif //TRI_COLLISION_PROFILING
 
 
 	static void find_collision(btGImpactQuantizedBvh * boxset1, const btTransform & trans1,
 	static void find_collision(btGImpactQuantizedBvh * boxset1, const btTransform & trans1,
 		btGImpactQuantizedBvh * boxset2, const btTransform & trans2,
 		btGImpactQuantizedBvh * boxset2, const btTransform & trans2,

+ 3 - 3
extern/include/bullet/BulletCollision/Gimpact/btQuantization.h

@@ -1,5 +1,5 @@
-#ifndef BT_QUANTIZATION_H_INCLUDED
-#define BT_QUANTIZATION_H_INCLUDED
+#ifndef BT_GIMPACT_QUANTIZATION_H_INCLUDED
+#define BT_GIMPACT_QUANTIZATION_H_INCLUDED
 
 
 /*! \file btQuantization.h
 /*! \file btQuantization.h
 *\author Francisco Leon Najera
 *\author Francisco Leon Najera
@@ -85,4 +85,4 @@ SIMD_FORCE_INLINE btVector3 bt_unquantize(
 
 
 
 
 
 
-#endif // GIM_VECTOR_H_INCLUDED
+#endif // BT_GIMPACT_QUANTIZATION_H_INCLUDED

+ 3 - 3
extern/include/bullet/BulletCollision/Gimpact/btTriangleShapeEx.h

@@ -22,8 +22,8 @@ subject to the following restrictions:
 */
 */
 
 
 
 
-#ifndef TRIANGLE_SHAPE_EX_H
-#define TRIANGLE_SHAPE_EX_H
+#ifndef GIMPACT_TRIANGLE_SHAPE_EX_H
+#define GIMPACT_TRIANGLE_SHAPE_EX_H
 
 
 #include "BulletCollision/CollisionShapes/btCollisionShape.h"
 #include "BulletCollision/CollisionShapes/btCollisionShape.h"
 #include "BulletCollision/CollisionShapes/btTriangleShape.h"
 #include "BulletCollision/CollisionShapes/btTriangleShape.h"
@@ -177,4 +177,4 @@ public:
 };
 };
 
 
 
 
-#endif //TRIANGLE_MESH_SHAPE_H
+#endif //GIMPACT_TRIANGLE_MESH_SHAPE_H

+ 11 - 4
extern/include/bullet/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h

@@ -14,13 +14,14 @@ subject to the following restrictions:
 */
 */
 
 
 
 
-#ifndef CONTINUOUS_COLLISION_CONVEX_CAST_H
-#define CONTINUOUS_COLLISION_CONVEX_CAST_H
+#ifndef BT_CONTINUOUS_COLLISION_CONVEX_CAST_H
+#define BT_CONTINUOUS_COLLISION_CONVEX_CAST_H
 
 
 #include "btConvexCast.h"
 #include "btConvexCast.h"
 #include "btSimplexSolverInterface.h"
 #include "btSimplexSolverInterface.h"
 class btConvexPenetrationDepthSolver;
 class btConvexPenetrationDepthSolver;
 class btConvexShape;
 class btConvexShape;
+class btStaticPlaneShape;
 
 
 /// btContinuousConvexCollision implements angular and linear time of impact for convex objects.
 /// btContinuousConvexCollision implements angular and linear time of impact for convex objects.
 /// Based on Brian Mirtich's Conservative Advancement idea (PhD thesis).
 /// Based on Brian Mirtich's Conservative Advancement idea (PhD thesis).
@@ -31,13 +32,18 @@ class btContinuousConvexCollision : public btConvexCast
 	btSimplexSolverInterface* m_simplexSolver;
 	btSimplexSolverInterface* m_simplexSolver;
 	btConvexPenetrationDepthSolver*	m_penetrationDepthSolver;
 	btConvexPenetrationDepthSolver*	m_penetrationDepthSolver;
 	const btConvexShape*	m_convexA;
 	const btConvexShape*	m_convexA;
-	const btConvexShape*	m_convexB;
+	//second object is either a convex or a plane (code sharing)
+	const btConvexShape*	m_convexB1;
+	const btStaticPlaneShape*	m_planeShape;
 
 
+	void computeClosestPoints( const btTransform& transA, const btTransform& transB,struct btPointCollector& pointCollector);
 
 
 public:
 public:
 
 
 	btContinuousConvexCollision (const btConvexShape*	shapeA,const btConvexShape*	shapeB ,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver);
 	btContinuousConvexCollision (const btConvexShape*	shapeA,const btConvexShape*	shapeB ,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver);
 
 
+	btContinuousConvexCollision(const btConvexShape*	shapeA,const btStaticPlaneShape*	plane );
+
 	virtual bool	calcTimeOfImpact(
 	virtual bool	calcTimeOfImpact(
 				const btTransform& fromA,
 				const btTransform& fromA,
 				const btTransform& toA,
 				const btTransform& toA,
@@ -48,5 +54,6 @@ public:
 
 
 };
 };
 
 
-#endif //CONTINUOUS_COLLISION_CONVEX_CAST_H
+
+#endif //BT_CONTINUOUS_COLLISION_CONVEX_CAST_H
 
 

+ 4 - 4
extern/include/bullet/BulletCollision/NarrowPhaseCollision/btConvexCast.h

@@ -14,8 +14,8 @@ subject to the following restrictions:
 */
 */
 
 
 
 
-#ifndef CONVEX_CAST_H
-#define CONVEX_CAST_H
+#ifndef BT_CONVEX_CAST_H
+#define BT_CONVEX_CAST_H
 
 
 #include "LinearMath/btTransform.h"
 #include "LinearMath/btTransform.h"
 #include "LinearMath/btVector3.h"
 #include "LinearMath/btVector3.h"
@@ -39,7 +39,7 @@ public:
 				
 				
 		virtual void	DebugDraw(btScalar	fraction) {(void)fraction;}
 		virtual void	DebugDraw(btScalar	fraction) {(void)fraction;}
 		virtual void	drawCoordSystem(const btTransform& trans) {(void)trans;}
 		virtual void	drawCoordSystem(const btTransform& trans) {(void)trans;}
-
+		virtual void	reportFailure(int errNo, int numIterations) {(void)errNo;(void)numIterations;}
 		CastResult()
 		CastResult()
 			:m_fraction(btScalar(BT_LARGE_FLOAT)),
 			:m_fraction(btScalar(BT_LARGE_FLOAT)),
 			m_debugDrawer(0),
 			m_debugDrawer(0),
@@ -70,4 +70,4 @@ public:
 					CastResult& result) = 0;
 					CastResult& result) = 0;
 };
 };
 
 
-#endif //CONVEX_CAST_H
+#endif //BT_CONVEX_CAST_H

+ 3 - 3
extern/include/bullet/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h

@@ -14,8 +14,8 @@ subject to the following restrictions:
 */
 */
 
 
 
 
-#ifndef __CONVEX_PENETRATION_DEPTH_H
-#define __CONVEX_PENETRATION_DEPTH_H
+#ifndef BT_CONVEX_PENETRATION_DEPTH_H
+#define BT_CONVEX_PENETRATION_DEPTH_H
 
 
 class btStackAlloc;
 class btStackAlloc;
 class btVector3;
 class btVector3;
@@ -38,5 +38,5 @@ public:
 
 
 
 
 };
 };
-#endif //CONVEX_PENETRATION_DEPTH_H
+#endif //BT_CONVEX_PENETRATION_DEPTH_H
 
 

+ 5 - 3
extern/include/bullet/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h

@@ -14,8 +14,9 @@ subject to the following restrictions:
 */
 */
 
 
 
 
-#ifndef DISCRETE_COLLISION_DETECTOR1_INTERFACE_H
-#define DISCRETE_COLLISION_DETECTOR1_INTERFACE_H
+#ifndef BT_DISCRETE_COLLISION_DETECTOR1_INTERFACE_H
+#define BT_DISCRETE_COLLISION_DETECTOR1_INTERFACE_H
+
 #include "LinearMath/btTransform.h"
 #include "LinearMath/btTransform.h"
 #include "LinearMath/btVector3.h"
 #include "LinearMath/btVector3.h"
 class btStackAlloc;
 class btStackAlloc;
@@ -86,4 +87,5 @@ struct btStorageResult : public btDiscreteCollisionDetectorInterface::Result
 		}
 		}
 };
 };
 
 
-#endif //DISCRETE_COLLISION_DETECTOR_INTERFACE1_H
+#endif //BT_DISCRETE_COLLISION_DETECTOR1_INTERFACE_H
+

+ 3 - 3
extern/include/bullet/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h

@@ -15,8 +15,8 @@ subject to the following restrictions:
 
 
 
 
 
 
-#ifndef GJK_CONVEX_CAST_H
-#define GJK_CONVEX_CAST_H
+#ifndef BT_GJK_CONVEX_CAST_H
+#define BT_GJK_CONVEX_CAST_H
 
 
 #include "BulletCollision/CollisionShapes/btCollisionMargin.h"
 #include "BulletCollision/CollisionShapes/btCollisionMargin.h"
 
 
@@ -47,4 +47,4 @@ public:
 
 
 };
 };
 
 
-#endif //GJK_CONVEX_CAST_H
+#endif //BT_GJK_CONVEX_CAST_H

+ 5 - 3
extern/include/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpa2.h

@@ -22,8 +22,9 @@ misrepresented as being the original software.
 /*
 /*
 GJK-EPA collision solver by Nathanael Presson, 2008
 GJK-EPA collision solver by Nathanael Presson, 2008
 */
 */
-#ifndef _68DA1F85_90B7_4bb0_A705_83B4040A75C6_
-#define _68DA1F85_90B7_4bb0_A705_83B4040A75C6_
+#ifndef BT_GJK_EPA2_H
+#define BT_GJK_EPA2_H
+
 #include "BulletCollision/CollisionShapes/btConvexShape.h"
 #include "BulletCollision/CollisionShapes/btConvexShape.h"
 
 
 ///btGjkEpaSolver contributed under zlib by Nathanael Presson
 ///btGjkEpaSolver contributed under zlib by Nathanael Presson
@@ -70,4 +71,5 @@ static bool		SignedDistance(	const btConvexShape* shape0,const btTransform& wtrs
 
 
 };
 };
 
 
-#endif
+#endif //BT_GJK_EPA2_H
+

+ 3 - 3
extern/include/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h

@@ -16,8 +16,8 @@ subject to the following restrictions:
 
 
 
 
 
 
-#ifndef GJK_PAIR_DETECTOR_H
-#define GJK_PAIR_DETECTOR_H
+#ifndef BT_GJK_PAIR_DETECTOR_H
+#define BT_GJK_PAIR_DETECTOR_H
 
 
 #include "btDiscreteCollisionDetectorInterface.h"
 #include "btDiscreteCollisionDetectorInterface.h"
 #include "BulletCollision/CollisionShapes/btCollisionMargin.h"
 #include "BulletCollision/CollisionShapes/btCollisionMargin.h"
@@ -100,4 +100,4 @@ public:
 
 
 };
 };
 
 
-#endif //GJK_PAIR_DETECTOR_H
+#endif //BT_GJK_PAIR_DETECTOR_H

+ 22 - 17
extern/include/bullet/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h

@@ -13,22 +13,27 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef MANIFOLD_CONTACT_POINT_H
-#define MANIFOLD_CONTACT_POINT_H
+#ifndef BT_MANIFOLD_CONTACT_POINT_H
+#define BT_MANIFOLD_CONTACT_POINT_H
 
 
 #include "LinearMath/btVector3.h"
 #include "LinearMath/btVector3.h"
 #include "LinearMath/btTransformUtil.h"
 #include "LinearMath/btTransformUtil.h"
 
 
-// Don't change following order of parameters
-ATTRIBUTE_ALIGNED16(struct) PfxConstraintRow {
-	btScalar mNormal[3];
-	btScalar mRhs;
-	btScalar mJacDiagInv;
-	btScalar mLowerLimit;
-	btScalar mUpperLimit;
-	btScalar mAccumImpulse;
-};
-
+#ifdef PFX_USE_FREE_VECTORMATH
+	#include "physics_effects/base_level/solver/pfx_constraint_row.h"
+typedef sce::PhysicsEffects::PfxConstraintRow btConstraintRow;
+#else
+	// Don't change following order of parameters
+	ATTRIBUTE_ALIGNED16(struct) btConstraintRow {
+		btScalar m_normal[3];
+		btScalar m_rhs;
+		btScalar m_jacDiagInv;
+		btScalar m_lowerLimit;
+		btScalar m_upperLimit;
+		btScalar m_accumImpulse;
+	};
+	typedef btConstraintRow PfxConstraintRow;
+#endif //PFX_USE_FREE_VECTORMATH
 
 
 
 
 
 
@@ -71,9 +76,9 @@ class btManifoldPoint
 					m_contactCFM2(0.f),
 					m_contactCFM2(0.f),
 					m_lifeTime(0)
 					m_lifeTime(0)
 			{
 			{
-				mConstraintRow[0].mAccumImpulse = 0.f;
-				mConstraintRow[1].mAccumImpulse = 0.f;
-				mConstraintRow[2].mAccumImpulse = 0.f;
+				mConstraintRow[0].m_accumImpulse = 0.f;
+				mConstraintRow[1].m_accumImpulse = 0.f;
+				mConstraintRow[2].m_accumImpulse = 0.f;
 			}
 			}
 
 
 			
 			
@@ -113,7 +118,7 @@ class btManifoldPoint
 
 
 
 
 
 
-			PfxConstraintRow mConstraintRow[3];
+			btConstraintRow mConstraintRow[3];
 
 
 
 
 			btScalar getDistance() const
 			btScalar getDistance() const
@@ -150,4 +155,4 @@ class btManifoldPoint
 
 
 	};
 	};
 
 
-#endif //MANIFOLD_CONTACT_POINT_H
+#endif //BT_MANIFOLD_CONTACT_POINT_H

+ 3 - 3
extern/include/bullet/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
-#define MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
+#ifndef BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
+#define BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
 
 
 #include "btConvexPenetrationDepthSolver.h"
 #include "btConvexPenetrationDepthSolver.h"
 
 
@@ -36,5 +36,5 @@ public:
 			);
 			);
 };
 };
 
 
-#endif //MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
+#endif //BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
 
 

+ 21 - 16
extern/include/bullet/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef PERSISTENT_MANIFOLD_H
-#define PERSISTENT_MANIFOLD_H
+#ifndef BT_PERSISTENT_MANIFOLD_H
+#define BT_PERSISTENT_MANIFOLD_H
 
 
 
 
 #include "LinearMath/btVector3.h"
 #include "LinearMath/btVector3.h"
@@ -32,11 +32,11 @@ typedef bool (*ContactProcessedCallback)(btManifoldPoint& cp,void* body0,void* b
 extern ContactDestroyedCallback	gContactDestroyedCallback;
 extern ContactDestroyedCallback	gContactDestroyedCallback;
 extern ContactProcessedCallback gContactProcessedCallback;
 extern ContactProcessedCallback gContactProcessedCallback;
 
 
-
+//the enum starts at 1024 to avoid type conflicts with btTypedConstraint
 enum btContactManifoldTypes
 enum btContactManifoldTypes
 {
 {
-	BT_PERSISTENT_MANIFOLD_TYPE = 1,
-	MAX_CONTACT_MANIFOLD_TYPE
+	MIN_CONTACT_MANIFOLD_TYPE = 1024,
+	BT_PERSISTENT_MANIFOLD_TYPE
 };
 };
 
 
 #define MANIFOLD_CACHE_SIZE 4
 #define MANIFOLD_CACHE_SIZE 4
@@ -146,9 +146,9 @@ public:
 			m_pointCache[index] = m_pointCache[lastUsedIndex]; 
 			m_pointCache[index] = m_pointCache[lastUsedIndex]; 
 			//get rid of duplicated userPersistentData pointer
 			//get rid of duplicated userPersistentData pointer
 			m_pointCache[lastUsedIndex].m_userPersistentData = 0;
 			m_pointCache[lastUsedIndex].m_userPersistentData = 0;
-			m_pointCache[lastUsedIndex].mConstraintRow[0].mAccumImpulse = 0.f;
-			m_pointCache[lastUsedIndex].mConstraintRow[1].mAccumImpulse = 0.f;
-			m_pointCache[lastUsedIndex].mConstraintRow[2].mAccumImpulse = 0.f;
+			m_pointCache[lastUsedIndex].mConstraintRow[0].m_accumImpulse = 0.f;
+			m_pointCache[lastUsedIndex].mConstraintRow[1].m_accumImpulse = 0.f;
+			m_pointCache[lastUsedIndex].mConstraintRow[2].m_accumImpulse = 0.f;
 
 
 			m_pointCache[lastUsedIndex].m_appliedImpulse = 0.f;
 			m_pointCache[lastUsedIndex].m_appliedImpulse = 0.f;
 			m_pointCache[lastUsedIndex].m_lateralFrictionInitialized = false;
 			m_pointCache[lastUsedIndex].m_lateralFrictionInitialized = false;
@@ -167,9 +167,9 @@ public:
 #define MAINTAIN_PERSISTENCY 1
 #define MAINTAIN_PERSISTENCY 1
 #ifdef MAINTAIN_PERSISTENCY
 #ifdef MAINTAIN_PERSISTENCY
 		int	lifeTime = m_pointCache[insertIndex].getLifeTime();
 		int	lifeTime = m_pointCache[insertIndex].getLifeTime();
-		btScalar	appliedImpulse = m_pointCache[insertIndex].mConstraintRow[0].mAccumImpulse;
-		btScalar	appliedLateralImpulse1 = m_pointCache[insertIndex].mConstraintRow[1].mAccumImpulse;
-		btScalar	appliedLateralImpulse2 = m_pointCache[insertIndex].mConstraintRow[2].mAccumImpulse;
+		btScalar	appliedImpulse = m_pointCache[insertIndex].mConstraintRow[0].m_accumImpulse;
+		btScalar	appliedLateralImpulse1 = m_pointCache[insertIndex].mConstraintRow[1].m_accumImpulse;
+		btScalar	appliedLateralImpulse2 = m_pointCache[insertIndex].mConstraintRow[2].m_accumImpulse;
 //		bool isLateralFrictionInitialized = m_pointCache[insertIndex].m_lateralFrictionInitialized;
 //		bool isLateralFrictionInitialized = m_pointCache[insertIndex].m_lateralFrictionInitialized;
 		
 		
 		
 		
@@ -184,9 +184,9 @@ public:
 		m_pointCache[insertIndex].m_appliedImpulseLateral1 = appliedLateralImpulse1;
 		m_pointCache[insertIndex].m_appliedImpulseLateral1 = appliedLateralImpulse1;
 		m_pointCache[insertIndex].m_appliedImpulseLateral2 = appliedLateralImpulse2;
 		m_pointCache[insertIndex].m_appliedImpulseLateral2 = appliedLateralImpulse2;
 		
 		
-		m_pointCache[insertIndex].mConstraintRow[0].mAccumImpulse =  appliedImpulse;
-		m_pointCache[insertIndex].mConstraintRow[1].mAccumImpulse = appliedLateralImpulse1;
-		m_pointCache[insertIndex].mConstraintRow[2].mAccumImpulse = appliedLateralImpulse2;
+		m_pointCache[insertIndex].mConstraintRow[0].m_accumImpulse =  appliedImpulse;
+		m_pointCache[insertIndex].mConstraintRow[1].m_accumImpulse = appliedLateralImpulse1;
+		m_pointCache[insertIndex].mConstraintRow[2].m_accumImpulse = appliedLateralImpulse2;
 
 
 
 
 		m_pointCache[insertIndex].m_lifeTime = lifeTime;
 		m_pointCache[insertIndex].m_lifeTime = lifeTime;
@@ -199,7 +199,12 @@ public:
 
 
 	bool validContactDistance(const btManifoldPoint& pt) const
 	bool validContactDistance(const btManifoldPoint& pt) const
 	{
 	{
-		return pt.m_distance1 <= getContactBreakingThreshold();
+		if (pt.m_lifeTime >1)
+		{
+			return pt.m_distance1 <= getContactBreakingThreshold();
+		}
+		return pt.m_distance1 <= getContactProcessingThreshold();
+	
 	}
 	}
 	/// calculated new worldspace coordinates and depth, and reject points that exceed the collision margin
 	/// calculated new worldspace coordinates and depth, and reject points that exceed the collision margin
 	void	refreshContactPoints(  const btTransform& trA,const btTransform& trB);
 	void	refreshContactPoints(  const btTransform& trA,const btTransform& trB);
@@ -224,4 +229,4 @@ public:
 
 
 
 
 
 
-#endif //PERSISTENT_MANIFOLD_H
+#endif //BT_PERSISTENT_MANIFOLD_H

+ 3 - 3
extern/include/bullet/BulletCollision/NarrowPhaseCollision/btPointCollector.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef POINT_COLLECTOR_H
-#define POINT_COLLECTOR_H
+#ifndef BT_POINT_COLLECTOR_H
+#define BT_POINT_COLLECTOR_H
 
 
 #include "btDiscreteCollisionDetectorInterface.h"
 #include "btDiscreteCollisionDetectorInterface.h"
 
 
@@ -60,5 +60,5 @@ struct btPointCollector : public btDiscreteCollisionDetectorInterface::Result
 	}
 	}
 };
 };
 
 
-#endif //POINT_COLLECTOR_H
+#endif //BT_POINT_COLLECTOR_H
 
 

+ 46 - 0
extern/include/bullet/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.h

@@ -0,0 +1,46 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2011 Advanced Micro Devices, Inc.  http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose, 
+including commercial applications, and to alter it and redistribute it freely, 
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+///This file was written by Erwin Coumans
+
+
+#ifndef BT_POLYHEDRAL_CONTACT_CLIPPING_H
+#define BT_POLYHEDRAL_CONTACT_CLIPPING_H
+
+
+#include "LinearMath/btAlignedObjectArray.h"
+#include "LinearMath/btTransform.h"
+#include "btDiscreteCollisionDetectorInterface.h"
+
+class btConvexPolyhedron;
+
+typedef btAlignedObjectArray<btVector3> btVertexArray;
+
+// Clips a face to the back of a plane
+struct btPolyhedralContactClipping
+{
+	static void clipHullAgainstHull(const btVector3& separatingNormal, const btConvexPolyhedron& hullA, const btConvexPolyhedron& hullB, const btTransform& transA,const btTransform& transB, const btScalar minDist, btScalar maxDist, btDiscreteCollisionDetectorInterface::Result& resultOut);
+	static void	clipFaceAgainstHull(const btVector3& separatingNormal, const btConvexPolyhedron& hullA,  const btTransform& transA, btVertexArray& worldVertsB1, const btScalar minDist, btScalar maxDist,btDiscreteCollisionDetectorInterface::Result& resultOut);
+
+	static bool findSeparatingAxis(	const btConvexPolyhedron& hullA, const btConvexPolyhedron& hullB, const btTransform& transA,const btTransform& transB, btVector3& sep);
+
+	///the clipFace method is used internally
+	static void clipFace(const btVertexArray& pVtxIn, btVertexArray& ppVtxOut, const btVector3& planeNormalWS,btScalar planeEqWS);
+
+};
+
+#endif // BT_POLYHEDRAL_CONTACT_CLIPPING_H
+

+ 5 - 4
extern/include/bullet/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef RAYCAST_TRI_CALLBACK_H
-#define RAYCAST_TRI_CALLBACK_H
+#ifndef BT_RAYCAST_TRI_CALLBACK_H
+#define BT_RAYCAST_TRI_CALLBACK_H
 
 
 #include "BulletCollision/CollisionShapes/btTriangleCallback.h"
 #include "BulletCollision/CollisionShapes/btTriangleCallback.h"
 #include "LinearMath/btTransform.h"
 #include "LinearMath/btTransform.h"
@@ -58,7 +58,8 @@ public:
 	btTransform m_convexShapeTo;
 	btTransform m_convexShapeTo;
 	btTransform m_triangleToWorld;
 	btTransform m_triangleToWorld;
 	btScalar m_hitFraction;
 	btScalar m_hitFraction;
-    btScalar m_triangleCollisionMargin;
+	btScalar m_triangleCollisionMargin;
+	btScalar m_allowedPenetration;
 
 
 	btTriangleConvexcastCallback (const btConvexShape* convexShape, const btTransform& convexShapeFrom, const btTransform& convexShapeTo, const btTransform& triangleToWorld, const btScalar triangleCollisionMargin);
 	btTriangleConvexcastCallback (const btConvexShape* convexShape, const btTransform& convexShapeFrom, const btTransform& convexShapeTo, const btTransform& triangleToWorld, const btScalar triangleCollisionMargin);
 
 
@@ -67,5 +68,5 @@ public:
 	virtual btScalar reportHit (const btVector3& hitNormalLocal, const btVector3& hitPointLocal, btScalar hitFraction, int partId, int triangleIndex) = 0;
 	virtual btScalar reportHit (const btVector3& hitNormalLocal, const btVector3& hitPointLocal, btScalar hitFraction, int partId, int triangleIndex) = 0;
 };
 };
 
 
-#endif //RAYCAST_TRI_CALLBACK_H
+#endif //BT_RAYCAST_TRI_CALLBACK_H
 
 

+ 3 - 3
extern/include/bullet/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h

@@ -15,8 +15,8 @@ subject to the following restrictions:
 
 
 
 
 
 
-#ifndef SIMPLEX_SOLVER_INTERFACE_H
-#define SIMPLEX_SOLVER_INTERFACE_H
+#ifndef BT_SIMPLEX_SOLVER_INTERFACE_H
+#define BT_SIMPLEX_SOLVER_INTERFACE_H
 
 
 #include "LinearMath/btVector3.h"
 #include "LinearMath/btVector3.h"
 
 
@@ -59,5 +59,5 @@ class btSimplexSolverInterface
 
 
 };
 };
 #endif
 #endif
-#endif //SIMPLEX_SOLVER_INTERFACE_H
+#endif //BT_SIMPLEX_SOLVER_INTERFACE_H
 
 

+ 3 - 3
extern/include/bullet/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h

@@ -14,8 +14,8 @@ subject to the following restrictions:
 */
 */
 
 
 
 
-#ifndef SUBSIMPLEX_CONVEX_CAST_H
-#define SUBSIMPLEX_CONVEX_CAST_H
+#ifndef BT_SUBSIMPLEX_CONVEX_CAST_H
+#define BT_SUBSIMPLEX_CONVEX_CAST_H
 
 
 #include "btConvexCast.h"
 #include "btConvexCast.h"
 #include "btSimplexSolverInterface.h"
 #include "btSimplexSolverInterface.h"
@@ -47,4 +47,4 @@ public:
 
 
 };
 };
 
 
-#endif //SUBSIMPLEX_CONVEX_CAST_H
+#endif //BT_SUBSIMPLEX_CONVEX_CAST_H

+ 4 - 3
extern/include/bullet/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h

@@ -15,8 +15,8 @@ subject to the following restrictions:
 
 
 
 
 
 
-#ifndef btVoronoiSimplexSolver_H
-#define btVoronoiSimplexSolver_H
+#ifndef BT_VORONOI_SIMPLEX_SOLVER_H
+#define BT_VORONOI_SIMPLEX_SOLVER_H
 
 
 #include "btSimplexSolverInterface.h"
 #include "btSimplexSolverInterface.h"
 
 
@@ -175,4 +175,5 @@ public:
 
 
 };
 };
 
 
-#endif //VoronoiSimplexSolver
+#endif //BT_VORONOI_SIMPLEX_SOLVER_H
+

+ 1 - 0
extern/include/bullet/BulletCollision/btBulletCollisionCommon.h

@@ -33,6 +33,7 @@ subject to the following restrictions:
 #include "BulletCollision/CollisionShapes/btTriangleMesh.h"
 #include "BulletCollision/CollisionShapes/btTriangleMesh.h"
 #include "BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h"
 #include "BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h"
 #include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"
 #include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"
+#include "BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h"
 #include "BulletCollision/CollisionShapes/btTriangleMeshShape.h"
 #include "BulletCollision/CollisionShapes/btTriangleMeshShape.h"
 #include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h"
 #include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h"
 #include "BulletCollision/CollisionShapes/btCompoundShape.h"
 #include "BulletCollision/CollisionShapes/btCompoundShape.h"

+ 4 - 3
extern/include/bullet/BulletDynamics/Character/btCharacterControllerInterface.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef CHARACTER_CONTROLLER_INTERFACE_H
-#define CHARACTER_CONTROLLER_INTERFACE_H
+#ifndef BT_CHARACTER_CONTROLLER_INTERFACE_H
+#define BT_CHARACTER_CONTROLLER_INTERFACE_H
 
 
 #include "LinearMath/btVector3.h"
 #include "LinearMath/btVector3.h"
 #include "BulletDynamics/Dynamics/btActionInterface.h"
 #include "BulletDynamics/Dynamics/btActionInterface.h"
@@ -42,4 +42,5 @@ public:
 	virtual bool	onGround () const = 0;
 	virtual bool	onGround () const = 0;
 };
 };
 
 
-#endif
+#endif //BT_CHARACTER_CONTROLLER_INTERFACE_H
+

+ 3 - 3
extern/include/bullet/BulletDynamics/Character/btKinematicCharacterController.h

@@ -14,8 +14,8 @@ subject to the following restrictions:
 */
 */
 
 
 
 
-#ifndef KINEMATIC_CHARACTER_CONTROLLER_H
-#define KINEMATIC_CHARACTER_CONTROLLER_H
+#ifndef BT_KINEMATIC_CHARACTER_CONTROLLER_H
+#define BT_KINEMATIC_CHARACTER_CONTROLLER_H
 
 
 #include "LinearMath/btVector3.h"
 #include "LinearMath/btVector3.h"
 
 
@@ -159,4 +159,4 @@ public:
 	bool onGround () const;
 	bool onGround () const;
 };
 };
 
 
-#endif // KINEMATIC_CHARACTER_CONTROLLER_H
+#endif // BT_KINEMATIC_CHARACTER_CONTROLLER_H

+ 18 - 4
extern/include/bullet/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h

@@ -33,8 +33,8 @@ and swing 1 and 2 are along the z and y axes respectively.
 
 
 
 
 
 
-#ifndef CONETWISTCONSTRAINT_H
-#define CONETWISTCONSTRAINT_H
+#ifndef BT_CONETWISTCONSTRAINT_H
+#define BT_CONETWISTCONSTRAINT_H
 
 
 #include "LinearMath/btVector3.h"
 #include "LinearMath/btVector3.h"
 #include "btJacobianEntry.h"
 #include "btJacobianEntry.h"
@@ -144,6 +144,7 @@ public:
 
 
 	void	updateRHS(btScalar	timeStep);
 	void	updateRHS(btScalar	timeStep);
 
 
+
 	const btRigidBody& getRigidBodyA() const
 	const btRigidBody& getRigidBodyA() const
 	{
 	{
 		return m_rbA;
 		return m_rbA;
@@ -244,7 +245,6 @@ public:
 	}
 	}
 	bool isPastSwingLimit() { return m_solveSwingLimit; }
 	bool isPastSwingLimit() { return m_solveSwingLimit; }
 
 
-
 	void setDamping(btScalar damping) { m_damping = damping; }
 	void setDamping(btScalar damping) { m_damping = damping; }
 
 
 	void enableMotor(bool b) { m_bMotorEnabled = b; }
 	void enableMotor(bool b) { m_bMotorEnabled = b; }
@@ -268,6 +268,20 @@ public:
 	///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5). 
 	///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5). 
 	///If no axis is provided, it uses the default axis for this constraint.
 	///If no axis is provided, it uses the default axis for this constraint.
 	virtual	void setParam(int num, btScalar value, int axis = -1);
 	virtual	void setParam(int num, btScalar value, int axis = -1);
+
+	virtual void setFrames(const btTransform& frameA, const btTransform& frameB);
+
+	const btTransform& getFrameOffsetA() const
+	{
+		return m_rbAFrame;
+	}
+
+	const btTransform& getFrameOffsetB() const
+	{
+		return m_rbBFrame;
+	}
+
+
 	///return the local value of parameter
 	///return the local value of parameter
 	virtual	btScalar getParam(int num, int axis = -1) const;
 	virtual	btScalar getParam(int num, int axis = -1) const;
 
 
@@ -329,4 +343,4 @@ SIMD_FORCE_INLINE const char*	btConeTwistConstraint::serialize(void* dataBuffer,
 }
 }
 
 
 
 
-#endif //CONETWISTCONSTRAINT_H
+#endif //BT_CONETWISTCONSTRAINT_H

+ 3 - 3
extern/include/bullet/BulletDynamics/ConstraintSolver/btConstraintSolver.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef CONSTRAINT_SOLVER_H
-#define CONSTRAINT_SOLVER_H
+#ifndef BT_CONSTRAINT_SOLVER_H
+#define BT_CONSTRAINT_SOLVER_H
 
 
 #include "LinearMath/btScalar.h"
 #include "LinearMath/btScalar.h"
 
 
@@ -49,4 +49,4 @@ public:
 
 
 
 
 
 
-#endif //CONSTRAINT_SOLVER_H
+#endif //BT_CONSTRAINT_SOLVER_H

+ 6 - 3
extern/include/bullet/BulletDynamics/ConstraintSolver/btContactConstraint.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef CONTACT_CONSTRAINT_H
-#define CONTACT_CONSTRAINT_H
+#ifndef BT_CONTACT_CONSTRAINT_H
+#define BT_CONTACT_CONSTRAINT_H
 
 
 #include "LinearMath/btVector3.h"
 #include "LinearMath/btVector3.h"
 #include "btJacobianEntry.h"
 #include "btJacobianEntry.h"
@@ -57,6 +57,9 @@ public:
 
 
 };
 };
 
 
+///very basic collision resolution without friction
+btScalar resolveSingleCollision(btRigidBody* body1, class btCollisionObject* colObj2, const btVector3& contactPositionWorld,const btVector3& contactNormalOnB, const struct btContactSolverInfo& solverInfo,btScalar distance);
+
 
 
 ///resolveSingleBilateral is an obsolete methods used for vehicle friction between two dynamic objects
 ///resolveSingleBilateral is an obsolete methods used for vehicle friction between two dynamic objects
 void resolveSingleBilateral(btRigidBody& body1, const btVector3& pos1,
 void resolveSingleBilateral(btRigidBody& body1, const btVector3& pos1,
@@ -65,4 +68,4 @@ void resolveSingleBilateral(btRigidBody& body1, const btVector3& pos1,
 
 
 
 
 
 
-#endif //CONTACT_CONSTRAINT_H
+#endif //BT_CONTACT_CONSTRAINT_H

+ 4 - 4
extern/include/bullet/BulletDynamics/ConstraintSolver/btContactSolverInfo.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef CONTACT_SOLVER_INFO
-#define CONTACT_SOLVER_INFO
+#ifndef BT_CONTACT_SOLVER_INFO
+#define BT_CONTACT_SOLVER_INFO
 
 
 enum	btSolverMode
 enum	btSolverMode
 {
 {
@@ -35,7 +35,7 @@ struct btContactSolverInfoData
 	
 	
 
 
 	btScalar	m_tau;
 	btScalar	m_tau;
-	btScalar	m_damping;
+	btScalar	m_damping;//global non-contact constraint damping, can be locally overridden by constraints during 'getInfo2'.
 	btScalar	m_friction;
 	btScalar	m_friction;
 	btScalar	m_timeStep;
 	btScalar	m_timeStep;
 	btScalar	m_restitution;
 	btScalar	m_restitution;
@@ -84,4 +84,4 @@ struct btContactSolverInfo : public btContactSolverInfoData
 	}
 	}
 };
 };
 
 
-#endif //CONTACT_SOLVER_INFO
+#endif //BT_CONTACT_SOLVER_INFO

+ 33 - 7
extern/include/bullet/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h

@@ -24,8 +24,8 @@ http://gimpact.sf.net
 */
 */
 
 
 
 
-#ifndef GENERIC_6DOF_CONSTRAINT_H
-#define GENERIC_6DOF_CONSTRAINT_H
+#ifndef BT_GENERIC_6DOF_CONSTRAINT_H
+#define BT_GENERIC_6DOF_CONSTRAINT_H
 
 
 #include "LinearMath/btVector3.h"
 #include "LinearMath/btVector3.h"
 #include "btJacobianEntry.h"
 #include "btJacobianEntry.h"
@@ -433,6 +433,7 @@ public:
 	*/
 	*/
 	btScalar getRelativePivotPosition(int axis_index) const;
 	btScalar getRelativePivotPosition(int axis_index) const;
 
 
+	void setFrames(const btTransform & frameA, const btTransform & frameB);
 
 
 	//! Test angular limit.
 	//! Test angular limit.
 	/*!
 	/*!
@@ -446,10 +447,20 @@ public:
     	m_linearLimits.m_lowerLimit = linearLower;
     	m_linearLimits.m_lowerLimit = linearLower;
     }
     }
 
 
-    void	setLinearUpperLimit(const btVector3& linearUpper)
-    {
-    	m_linearLimits.m_upperLimit = linearUpper;
-    }
+	void	getLinearLowerLimit(btVector3& linearLower)
+	{
+		linearLower = m_linearLimits.m_lowerLimit;
+	}
+
+	void	setLinearUpperLimit(const btVector3& linearUpper)
+	{
+		m_linearLimits.m_upperLimit = linearUpper;
+	}
+
+	void	getLinearUpperLimit(btVector3& linearUpper)
+	{
+		linearUpper = m_linearLimits.m_upperLimit;
+	}
 
 
     void	setAngularLowerLimit(const btVector3& angularLower)
     void	setAngularLowerLimit(const btVector3& angularLower)
     {
     {
@@ -457,12 +468,24 @@ public:
 			m_angularLimits[i].m_loLimit = btNormalizeAngle(angularLower[i]);
 			m_angularLimits[i].m_loLimit = btNormalizeAngle(angularLower[i]);
     }
     }
 
 
+	void	getAngularLowerLimit(btVector3& angularLower)
+	{
+		for(int i = 0; i < 3; i++) 
+			angularLower[i] = m_angularLimits[i].m_loLimit;
+	}
+
     void	setAngularUpperLimit(const btVector3& angularUpper)
     void	setAngularUpperLimit(const btVector3& angularUpper)
     {
     {
 		for(int i = 0; i < 3; i++)
 		for(int i = 0; i < 3; i++)
 			m_angularLimits[i].m_hiLimit = btNormalizeAngle(angularUpper[i]);
 			m_angularLimits[i].m_hiLimit = btNormalizeAngle(angularUpper[i]);
     }
     }
 
 
+	void	getAngularUpperLimit(btVector3& angularUpper)
+	{
+		for(int i = 0; i < 3; i++)
+			angularUpper[i] = m_angularLimits[i].m_hiLimit;
+	}
+
 	//! Retrieves the angular limit informacion
 	//! Retrieves the angular limit informacion
     btRotationalLimitMotor * getRotationalLimitMotor(int index)
     btRotationalLimitMotor * getRotationalLimitMotor(int index)
     {
     {
@@ -525,6 +548,9 @@ public:
 	///return the local value of parameter
 	///return the local value of parameter
 	virtual	btScalar getParam(int num, int axis = -1) const;
 	virtual	btScalar getParam(int num, int axis = -1) const;
 
 
+	void setAxis( const btVector3& axis1, const btVector3& axis2);
+
+
 	virtual	int	calculateSerializeBufferSize() const;
 	virtual	int	calculateSerializeBufferSize() const;
 
 
 	///fills the dataBuffer and returns the struct name (and 0 on failure)
 	///fills the dataBuffer and returns the struct name (and 0 on failure)
@@ -585,4 +611,4 @@ SIMD_FORCE_INLINE	const char*	btGeneric6DofConstraint::serialize(void* dataBuffe
 
 
 
 
 
 
-#endif //GENERIC_6DOF_CONSTRAINT_H
+#endif //BT_GENERIC_6DOF_CONSTRAINT_H

+ 45 - 3
extern/include/bullet/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h

@@ -13,8 +13,8 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef GENERIC_6DOF_SPRING_CONSTRAINT_H
-#define GENERIC_6DOF_SPRING_CONSTRAINT_H
+#ifndef BT_GENERIC_6DOF_SPRING_CONSTRAINT_H
+#define BT_GENERIC_6DOF_SPRING_CONSTRAINT_H
 
 
 
 
 #include "LinearMath/btVector3.h"
 #include "LinearMath/btVector3.h"
@@ -48,8 +48,50 @@ public:
 	void setEquilibriumPoint(); // set the current constraint position/orientation as an equilibrium point for all DOF
 	void setEquilibriumPoint(); // set the current constraint position/orientation as an equilibrium point for all DOF
 	void setEquilibriumPoint(int index);  // set the current constraint position/orientation as an equilibrium point for given DOF
 	void setEquilibriumPoint(int index);  // set the current constraint position/orientation as an equilibrium point for given DOF
 	void setEquilibriumPoint(int index, btScalar val);
 	void setEquilibriumPoint(int index, btScalar val);
+
+	virtual void setAxis( const btVector3& axis1, const btVector3& axis2);
+
 	virtual void getInfo2 (btConstraintInfo2* info);
 	virtual void getInfo2 (btConstraintInfo2* info);
+
+	virtual	int	calculateSerializeBufferSize() const;
+	///fills the dataBuffer and returns the struct name (and 0 on failure)
+	virtual	const char*	serialize(void* dataBuffer, btSerializer* serializer) const;
+
 };
 };
 
 
-#endif // GENERIC_6DOF_SPRING_CONSTRAINT_H
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btGeneric6DofSpringConstraintData
+{
+	btGeneric6DofConstraintData	m_6dofData;
+	
+	int			m_springEnabled[6];
+	float		m_equilibriumPoint[6];
+	float		m_springStiffness[6];
+	float		m_springDamping[6];
+};
+
+SIMD_FORCE_INLINE	int	btGeneric6DofSpringConstraint::calculateSerializeBufferSize() const
+{
+	return sizeof(btGeneric6DofSpringConstraintData);
+}
+
+	///fills the dataBuffer and returns the struct name (and 0 on failure)
+SIMD_FORCE_INLINE	const char*	btGeneric6DofSpringConstraint::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+	btGeneric6DofSpringConstraintData* dof = (btGeneric6DofSpringConstraintData*)dataBuffer;
+	btGeneric6DofConstraint::serialize(&dof->m_6dofData,serializer);
+
+	int i;
+	for (i=0;i<6;i++)
+	{
+		dof->m_equilibriumPoint[i] = m_equilibriumPoint[i];
+		dof->m_springDamping[i] = m_springDamping[i];
+		dof->m_springEnabled[i] = m_springEnabled[i]? 1 : 0;
+		dof->m_springStiffness[i] = m_springStiffness[i];
+	}
+	return "btGeneric6DofConstraintData";
+}
+
+#endif // BT_GENERIC_6DOF_SPRING_CONSTRAINT_H
 
 

部分文件因文件數量過多而無法顯示