Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From #42:
...turns out, it did break something. Since we can't fix the first of the issues mentioned below (reported by @ QuantumCoderQC, thanks!) in haxebullet, I reverted the ammo update and instead implemented
Ammo.UTF8ToString()
via the Haxe standard lib, which luckily has this functionality as well.The issues reported with the ammo update were as follows (this might become important again if we update ammo):
Ammo._free()
does no longer exist in the updated Ammo version although it's referenced by the JS code generated by emscripten, which caused an exception when deleting softbody objects. I assume it is optimized away during C/C++ --> wasm compilation (see this) because it probably isn't used by the C++ code, but only by the JS code generated from emscripten (which is probably generated after the wasm has been compiled).To completely fix this, one would probably need to apply something à la kripken/ammo.js@a4bec93 but for
_free
and then compile ammo again. The issue has already been reported at _free is not a function (ammo.wasm) kripken/ammo.js#404, depending on how much time I get I might try to build it myself and provide a proper fix.There was a small API change: in the previous ammo wasm, there were both
GImpactCollisionAlgorithm
(referenced in Bt.hx) andbtGImpactCollisionAlgorithm
, in the newer version only the latter exists. So to fix this we need to change@:native('Ammo.GImpactCollisionAlgorithm')
here to@:native('Ammo.btGImpactCollisionAlgorithm')
.@luboslenco Do you remember whether bullet.cpp was generated automatically by webidl? The reason I'm asking is the following: I noticed that on the Haxe side in HL, we don't construct a
GImpactCollisionAlgorithm
instance to callregisterAlgorithm()
like in JS but instead use abtImpactMeshShape
instance to then call the very same static registerAlgorithm() function (note the difference between the function name and the function body).btImpactMeshShape
doesn't even have that function in Bullet, so I don't think that the linked code was generated automatically by webidl. This is perfectly fine, but I always thought that it was supposed to be automatically generated, so I'm a little confused about how to treat this file.