erwincoumans
d158507c03
remove m_localPosA for now (it breaks NVIDIA OpenCL, copy of structs > 128 bytes)
2013-08-08 13:28:23 -07:00
erwincoumans
3bf003ace1
change lcpp Lua preprocessor, to keep #defines and comments, remove empty lines
...
remove duplicate data in b3Contact4 (now in btContact4Data shared between CPU/C++ and OpenCL)
OpenCL kernels use #include "Bullet3Collision/NarrowPhaseCollision/shared/b3Contact4Data.h"
Increase number of batches back to 250 (from 50), need to fix this hard coded number (see https://github.com/erwincoumans/bullet3/issues/12 )
Work towards GJK/EPA, in addition to SAT/clipping (early on)
2013-08-08 12:24:09 -07:00
erwincoumans
46a08e3282
add missing header file, test case for sharing code between C++ / OpenCL
...
The headers are recursively embedded, only the necessary parts (skipping parts behind undeclared ifdefs)
2013-08-03 11:12:51 -07:00
erwincoumans
18eed5b067
further work towards sharing structures/code between C++ and OpenCL
...
(could break the build in C++/OpenCL)
2013-08-03 10:13:13 -07:00
erwincoumans
906415429c
added (and stripped) a simple C/C++ preprocessor (written in Lua), so the stringifier can handle the #include directive,
...
and embed the included files directly in the stringified files.
We need this, because we start sharing struct definitions and code between C/C++ and OpenCL (and potentially other languages)
preprocessor is from http://github.com/willsteel/lcpp
2013-08-01 21:05:19 -07:00
erwincoumans
34de49d8a4
add gjk/epa (host only), possibly improve convex-convex with many edge-edge tests
...
more preparation towards persistent/incremental contact cache
2013-07-31 23:22:43 -07:00
erwincoumans
7992ff816b
use int4 for broadphase pair, it allows to store persistent information in the future
...
(contact cache, applied impulse/warm starting info etc)
2013-07-31 09:58:15 -07:00
erwincoumans
338118b3c6
expose the number of frame that the benchmark mode runs as commandline parameter:
...
for example --max_framecount=1000
2013-07-30 18:00:14 -07:00
erwincoumans
1c0fc6bc2d
report when compound pair capacity is exceeded (and avoid crash)
...
add tetrahedron, reorganized demos
2013-07-30 17:00:50 -07:00
erwin coumans
2793a174c6
added fracture scene .bullet file (doesn't work well yet)
...
added tetrahedral mesh test scene
expose b3Config as member variable for demos.
move a 'glFlush' out of the innerloop (render performance)
SSE -> SSE2 in premake
fix crash in broadphase (when no aabb's exist)
2013-07-30 12:37:16 -07:00
erwin coumans
3ccc9680a1
add some basic build instructions and license info
2013-07-21 22:11:55 -07:00
erwin coumans
482212b702
add some basic build instructions and license info
2013-07-21 22:07:40 -07:00
erwin coumans
310d31f3d5
tweaks to demos, add middle-mouse support,
2013-07-21 00:36:00 -07:00
erwin coumans
5991eef749
add GPU incremental 3d sap (not enabled by default)
2013-07-20 21:16:24 -07:00
erwincoumans
a5b73e7c76
use Syoyo Fujita's Wavefront obj loader. made some performance improvements in debug mode for Visual Studio
...
use Maya style controls under Windows (need to fix Linux/OSX) use ALT+mouse to rotate, and mouse pick to pick objects
2013-07-18 15:55:38 -07:00
erwincoumans
733f9027fb
Deterministic simulation for concave and compound collision shapes: added childShapeA/B to b3Contact4 + sort on them
...
Use tetrahedra instead of barrel for convex demo (until performance for edge-edge is improved)
Increased #overlapping pair capacity from 12 to 16 / objec
2013-07-17 22:42:50 -07:00
erwincoumans
ab125fbb6d
implement GPU breakable constraints
...
add GPU fixed constraint
fix performance issue with concave meshes (didn't clear the number of concave-convex pairs, so it increased every frame)
2013-07-17 16:11:54 -07:00
erwincoumans
6d7d2531b5
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2013-07-16 19:05:34 -07:00
erwincoumans
3beae80a73
prepare for GPU fixed constraint (not done yet)
2013-07-16 19:05:07 -07:00
erwincoumans
b448e56a51
add basic CPU multi threading files from Bullet 2.x (still need to make it work)
2013-07-16 18:16:54 -07:00
erwincoumans
20f9e41ff0
remove some debug printf's from kernel (stringify doesn't handle it properly)
2013-07-15 10:36:02 -07:00
erwincoumans
a5d00c8219
add some clFinish for better profile timings
...
improved parallel batching, don't try to write for static objects,
this fixed a bug, when the hash of a static object was identical with hash of dynamic objects, causing it to be assigned a bogus 100+i batching number
The parallel batching is still not enabled, because we need to measure the batching size (todo)
2013-07-15 10:22:40 -07:00
erwincoumans
05ed1fdbcf
revert to useNewBatchingKernel, the other one is broken (need to figure out why)
2013-07-15 01:06:04 -07:00
erwin coumans
cc188ca815
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2013-07-14 19:16:55 -07:00
erwin coumans
1e31073f4b
made the simulation deterministic
...
disable 'simdwidth' optimization for determinism (need to double-check)
made the spatial batching 3D
2013-07-14 19:16:33 -07:00
erwin coumans
4b293130bd
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2013-07-12 20:46:49 -07:00
erwin coumans
061f7173b8
compute best axis on host and OpenCL for 1-axis SAP, based on best variance
2013-07-12 20:46:43 -07:00
erwin coumans
0fcdd290f5
remove dynamic OpenCL allocations at run-time
2013-07-12 16:00:25 -07:00
erwin coumans
74aa499ab6
fix b3GpuDynamicsWorld
2013-07-11 11:02:10 -07:00
erwin coumans
2aad8419b7
add support for picking, using point 2 point constraint
...
allow to remove constraints by unique id
added tiny wavefront loader, plan to use this instead of existing slow wavefront loader
2013-07-10 00:21:23 -07:00
erwin coumans
9610b369a3
fix constraint issue with b3GpuDynamicsWorld
2013-07-09 19:32:14 -07:00
erwin coumans
a3c2456c65
introduce b3GpuSolverConstraint and fix Windows build
2013-07-09 18:03:51 -07:00
erwin coumans
4a0d2847c4
allow to run each part of the GPU solver on CPU, for debugging purposes
2013-07-09 13:07:34 -07:00
erwin coumans
38bfcc859b
fix linux build
2013-07-09 11:36:21 -07:00
erwin coumans
bd2cd7b2a7
remove clFinish and copyToHost from GPU joint solver, performance is looking better now.
2013-07-09 11:19:16 -07:00
erwin coumans
c4375a09e4
added GPU joint solver for non-contact constraints. Only point 2 point version for now, will add some other constraints soon (changes are very local)
2013-07-09 10:46:47 -07:00
erwin coumans
b8d5cecfe3
joint (non-contact constraint) solver iterations is now working on GPU, but overall slower because of data copy.
...
Will move joint setup to GPU, and then some benefit should be visible.
Don't use 64 alignment, it causes data structures size mismatch between cpu and gpu
2013-07-06 14:11:32 -07:00
erwin coumans
3ca4d68f3e
added jointSolver.cl/h (not working yet)
2013-07-06 13:20:34 -07:00
erwin coumans
b18e03d737
work towards GPU joint solver (non-contact constraints), not working yet.
2013-07-06 13:11:13 -07:00
erwin coumans
3a6e1ccff4
work towards GPU joint solver (non-contact constraints), not working yet.
2013-07-06 13:08:58 -07:00
erwin coumans
01e5472f9f
add b3FixedConstraint, with less memory footprint than b3Generic6DofConstraint, and easier to port to OpenCL.
...
remove the 'obsolete' part of b3Generic6DofConstraint and b3Point2PointConstraint
2013-07-06 00:44:06 -07:00
erwin coumans
956c3fc267
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2013-07-02 21:13:54 -07:00
erwin coumans
28f6e0fbd3
towards GPU joint (non-contact) constraint solving. The ConstraintDemo shows that CPU performance is very good, so not much performance win is to be expected.
2013-07-02 21:13:42 -07:00
erwin coumans
72042f3094
add basic constraint demo
2013-07-02 11:07:50 -07:00
erwin coumans
0f78c696b5
GWEN improvement: allow to navigate TreeControl and ComboBox using the cursor keys
2013-07-01 23:43:49 -07:00
erwin coumans
6d6ef5d3dc
fixed many memory leaks
...
added working shadows, using basic shadow mapping
2013-06-30 23:19:14 -07:00
erwin coumans
f2cc840c31
move shaders to .glsl files and stringify to .h file.
...
add crude screenshot facility (using F1 key), it can also be used for debugging
start with shadows using shadowmap, not working yet
add experimental 'ignore' body index in raycast, using b3HitInfo.m_m_hitResult2
2013-06-28 14:10:23 -07:00
erwin coumans
bb723f9fd1
remove some un-used data from b3Generic6DofConstraint
...
add GLRenderToTexture helper class
enable OpenGLTrueTypeFont test
2013-06-26 16:09:40 -07:00
erwincoumans
e39af46403
fix ray-convex header file
2013-06-20 16:41:11 -07:00
erwincoumans
d935eb2520
fixes in ray-convex for GPU
2013-06-20 16:27:36 -07:00
erwincoumans
47403c7e6f
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2013-06-20 12:55:35 -07:00
erwin coumans
92f2f330df
fix OpenCL kernel: NVIDIA crashes in clBuildProgram and AMD reports an error 'irreducable flow detected" ?!?
...
ray-convex works on GPU
2013-06-20 11:50:19 -07:00
erwin coumans
330bf3ea09
start implementing ray-convex on GPU (work-in-progress)
2013-06-20 11:33:00 -07:00
erwin coumans
c959f32d7e
added b3Clock/b3Quickprof files
2013-06-20 10:14:21 -07:00
erwin coumans
531af1b394
add ray-convex CPU implementation, make CPU raytest default for now
...
tweak/increase the b3Config values again, so it works better on the Macbook Retina GPU.
2013-06-20 00:29:09 -07:00
erwin coumans
a69ba48de4
Move b3Quickprof.* from Bullet 3.x src folder to btgui/Timing
...
The Bullet 3.x B3_PROFILE can be customized using b3SetCustomEnterProfileZoneFunc/b3SetCustomLeaveProfileZoneFunc defined in Bullet3Common/b3Logging,
so you can hook Bullet 3.x up to your profiler of choice.
The Demos3/BasicGpuDemo will show the Bullet 3.x timings inside the Bullet 2.x btQuickprof profiler.
2013-06-19 22:08:03 -07:00
Erwin Coumans
7d79555f50
only disable fastscan in radix sort for __APPLE__, this should improve Linux performance (previously it went through the slower path under Linux)
2013-06-19 23:18:17 -07:00
Erwin Coumans
fa4394c378
remove bullet2.patch, the file is not necessary anymore.
...
You can use Bullet 3.x standalone, or you can use Bullet3+Bullet2 by checking out the source code of both repositories at the same location,
and then use premake --bullet2gpu gmake (or vs2010, xcode4) to generate the combined project, with App_BasicGpuDemo_* test app.
2013-06-19 23:14:02 -07:00
erwincoumans
13a4084adf
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2013-06-19 12:52:12 -07:00
erwin coumans
aa1c2db35a
Add support for b3Generic6DofConstraint in Bullet, CPU only for now. Also the b3GpuDynamicsWorld supports conversion of this constraint.
...
This means, picking works both with and without holding SHIFT (rayTest is only implemented for spheres)
2013-06-19 12:28:51 -07:00
erwin coumans
f10eb86f55
enable the GPU ray test in BasicGpuDemo, only for spheres at the moment
2013-06-19 00:12:06 -07:00
erwin coumans
481d54967f
Fixes in raycast (against sphere), point 2 point constraint
...
Picking test works, holding shift in App_BasicGpuDemo_*
2013-06-18 19:33:45 -07:00
erwincoumans
41b49b6e18
use clew/clew.h path
2013-06-17 17:11:04 -07:00
erwincoumans
9a92eecf10
allow larger amount of rigid bodies, dynamically increase b3Config limits
...
avoid crashes in instancing renderer if instance maximum is exceeded.
2013-06-17 17:05:01 -07:00
erwincoumans
561a44e5d8
Try to avoid crashes if memory allocations fail
...
Deal with cases exceeding allocations of bodies/shapes above the limits set in b3Config
(work-in-progress )
2013-06-17 15:55:41 -07:00
erwincoumans
e179d5882e
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2013-06-17 13:47:41 -07:00
erwincoumans
161c48d331
work-in-progress Bullet 3.x GPU raytest
...
work-in-progress P2P constraint for b3GpuDynamicsWorld
2013-06-17 13:47:35 -07:00
erwin coumans
31282ab85e
don't crash if the maximum number of pairs is exceeded, but report an error using b3Error
2013-06-17 13:23:41 -07:00
erwin coumans
f73d11d896
tweak default values of b3Config.h so some laptop GPUs can run 128k scenes
...
return the result of resize
use size_t instead of int for btOpenCLArray
BasicInitialize demo will test how much memory can be allocated, using the btOpenCLArray
2013-06-14 12:10:16 -07:00
erwincoumans
02a858e7c1
pass in b3Config
2013-06-08 11:32:29 -07:00
erwin coumans
100449d76f
faster scene construction when not using instancing (avoid copy individual vertices/shapes to GPU, but do it afterwards in a batch), copy GPU data in 'writeAllBodiesToGpu' method
...
add option --no_instanced_collision_shapes, this only applies to the 2 benchmark screnes at the moment
always use the user specified b3Config file, so the settings can be set at runtime, not just at compile time
adjust default constants in b3Config (needs more tweaking, ideally at run-time)
2013-06-08 11:08:44 -07:00
erwin coumans
3f10082aa3
add missing rayCast kernel
2013-06-07 20:47:47 -07:00
erwincoumans
9fe48d887d
b3GpuDynamicsWorld improvements:
...
apply forces
copy linear/angular velocity every frame at the CPU side, initial velocity works now
hook up setGravity
Note: the 'stepSimulation' for GPU only simulates a single simulation frame.
2013-06-06 22:01:06 -07:00
Erwin Coumans
b36eba864f
start with box-plane for benchmarking
2013-06-04 05:28:01 -07:00
erwin coumans
ff3c79b900
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2013-06-03 17:58:15 -07:00
erwin coumans
5317b7d0c2
add do-while to logging functions, to avoid errors in user code: if b3Error("msg"); else {...} would fail before
2013-06-03 15:39:47 -07:00
erwin coumans
31e0d0fd38
add support for motion state and internal pre-tick callback
2013-06-03 15:17:06 -07:00
erwin coumans
76b0d7697a
Added b3Printf, b3Warning and b3Error that can be re-routed to custom handlers.
...
See in src/Bullet3Common/b3Logging.h for details
2013-06-03 13:10:27 -07:00
erwin coumans
70b4ead641
remove some warnings
2013-06-03 10:16:50 -07:00
erwin coumans
a886a978b7
add preliminary GPU ray cast (brute-force slow, only against sphere, allocates OpenCL buffers at every cast)
2013-05-28 18:39:53 -07:00
Erwin Coumans
f55473d586
GpuRaytraceScene work-in-progress, CPU only at the moment.
2013-05-27 00:42:28 -07:00
Erwin Coumans
a3559b3c92
add preliminary ray tracing test (ray-sphere placeholder on CPU)
2013-05-25 01:45:43 -07:00
Erwin Coumans
084bc4ec32
improve the benchmark mode, with 2 files (csv and details)
2013-05-23 18:34:39 -07:00
erwin coumans
9365735a8f
fix clew/Windows build (disable CL/GL sharing)
2013-05-21 16:58:03 -07:00
erwin coumans
d25e21614a
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2013-05-21 16:47:23 -07:00
erwin coumans
2ec9599c87
fix duplicate link symbol when used with Bullet 2.x
2013-05-15 16:22:10 +02:00
erwin coumans
4877a2af8a
enable CPU joint (non-contact) constraint solver in GPU rigid body pipeline
...
small change to BasicGpuDemo
2013-05-08 15:55:02 -07:00
erwincoumans
25fe5f4a77
prepare for GPU cloth/softbody
2013-05-06 18:35:34 -07:00
erwin coumans
b882211769
fix Linux build for enet test
2013-05-04 21:30:51 -07:00
erwin coumans
818a78efe3
enet NAT punchthrough test improvement, seems to work fine for my test setup
2013-05-04 21:28:51 -07:00
erwin coumans
c0a1ad8fcd
add enet test for remote visual debugger
2013-05-04 19:50:56 -07:00
erwin coumans
26873328cf
gridtable needs to be in the __constant memory space
2013-05-03 11:38:23 -07:00
erwin coumans
09ddf554e4
patch to make Bullet 2.x bridge work (should be applied soon)
2013-05-03 09:25:57 -07:00
erwin coumans
1185de51d5
experiment with first-level batching using object index instead of spatial hash in uniform grid (to avoid tuning average object size for uniform grid)
2013-05-03 01:14:34 -07:00
erwin coumans
6ee9eb9bb5
fix bug in assignment of contact constraints to solver grid (always use dynamic body to determine constraint assignment, otherwise write conflicts can occur)
...
implement CPU version of narrowphase convex collision, for comparison/debug purposes
start towards cpu/gpu sync, for adding/removing bodies (work in progress)
2013-05-02 09:49:16 -07:00
erwincoumans
de17d6044c
add missing premake file
2013-05-01 10:14:37 -07:00
erwin coumans
3438d1c8f6
compute actual local workgroup size, instead of a hard-coded value
2013-05-01 10:04:56 -07:00
erwincoumans
6d21d10cb4
add a temporary Bullet 2.x patch to make the Gpu demo work
2013-04-30 18:21:21 -07:00
erwincoumans
e999903c15
resolve some naming conflicts between Bullet 3.x and Bullet 2.x
...
add BasicGpuDemo that bridges Bullet 2.x and Bullet 3.x (still preliminary/crashing/instable)
2013-04-30 18:17:44 -07:00
erwincoumans
bf7a779562
fix crash in Test_BitonicSort
2013-04-30 12:40:55 -07:00