aboutsummaryrefslogtreecommitdiff
path: root/thirdparty/bullet/Bullet3Common/shared/b3PlatformDefinitions.h
diff options
context:
space:
mode:
authorRémi Verschelde2018-01-13 14:01:53 +0100
committerRémi Verschelde2018-01-13 14:08:45 +0100
commite12c89e8c9896b2e5cdd70dbd2d2acb449ff4b94 (patch)
treeaf68e434545e20c538f896e28b73f2db7d626edd /thirdparty/bullet/Bullet3Common/shared/b3PlatformDefinitions.h
parent53c65ae7619ac9e80c89a321c70de64f3745e2aa (diff)
downloadgodot-e12c89e8c9896b2e5cdd70dbd2d2acb449ff4b94.tar.gz
godot-e12c89e8c9896b2e5cdd70dbd2d2acb449ff4b94.tar.zst
godot-e12c89e8c9896b2e5cdd70dbd2d2acb449ff4b94.zip
bullet: Streamline bundling, remove extraneous src/ folder
Document version and how to extract sources in thirdparty/README.md. Drop unnecessary CMake and Premake files. Simplify SCsub, drop unused one.
Diffstat (limited to 'thirdparty/bullet/Bullet3Common/shared/b3PlatformDefinitions.h')
-rw-r--r--thirdparty/bullet/Bullet3Common/shared/b3PlatformDefinitions.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/thirdparty/bullet/Bullet3Common/shared/b3PlatformDefinitions.h b/thirdparty/bullet/Bullet3Common/shared/b3PlatformDefinitions.h
new file mode 100644
index 000000000..1c133fb08
--- /dev/null
+++ b/thirdparty/bullet/Bullet3Common/shared/b3PlatformDefinitions.h
@@ -0,0 +1,41 @@
+#ifndef B3_PLATFORM_DEFINITIONS_H
+#define B3_PLATFORM_DEFINITIONS_H
+
+struct MyTest
+{
+ int bla;
+};
+
+#ifdef __cplusplus
+//#define b3ConstArray(a) const b3AlignedObjectArray<a>&
+#define b3ConstArray(a) const a*
+#define b3AtomicInc(a) ((*a)++)
+
+inline int b3AtomicAdd (volatile int *p, int val)
+{
+ int oldValue = *p;
+ int newValue = oldValue+val;
+ *p = newValue;
+ return oldValue;
+}
+
+#define __global
+
+#define B3_STATIC static
+#else
+//keep B3_LARGE_FLOAT*B3_LARGE_FLOAT < FLT_MAX
+#define B3_LARGE_FLOAT 1e18f
+#define B3_INFINITY 1e18f
+#define b3Assert(a)
+#define b3ConstArray(a) __global const a*
+#define b3AtomicInc atomic_inc
+#define b3AtomicAdd atomic_add
+#define b3Fabs fabs
+#define b3Sqrt native_sqrt
+#define b3Sin native_sin
+#define b3Cos native_cos
+
+#define B3_STATIC
+#endif
+
+#endif