Open jefvel opened 4 years ago
Hi, @jefvel
Have you been able to resolve this issue? I am facing a somewhat similar issue here. Any help would be great.
Best Regards QC
Hey! Nope, haven't done any progress on this, sorry. Would still like to know how to do it
Sorry I can't help with this more, but the only guidance I can give is to check out the Haxebullet bindings and comb through that to see if there is any useful guidance in there. I don't know anything about it myself, but that repo might show you if it's possible or not.
@zicklag That's exactly where my issue is. I have the idl and cpp codes for the Bullet library, but don't know how to call a function that takes in an array as a parameter.
Hmm, maybe you can search the Armory source code to see if it uses that function and how it passes the array?
Here you have a working example → https://github.com/Sanva/haxe-webidl-example .
Please note that I'm using my own WebIDL fork, because of this → https://github.com/Sanva/webidl/commit/a57a4c633ad221068245f84a87648e1ff6bca7c0 .
I'm planning to do a pull request, of course, but even knowing C/C++, I'm not really a C/C++ experienced programmer — and with even less knowledge about this WebIDL thing... But I think that []
instead of *
is precisely a WebIDL thing [1] that made it's way to C++ generation code — so, I would like if some of you could test previously working examples that you could have to see if this could break something. Or, if you see this right (@ncannasse) I can make a pull request now.
[1] I know about int value[]
syntax in C++, but that where creating things like HL_PRIM int[] HL_NAME(IntTuple_set_raw)( _ref(IntTuple)* _this, int[] value )
, which is invalid syntax.
Hi @Sanva
Thank you for your reply. That is a very interesting way of overcoming this issue. I will try it out in my case and hope it works.
Best Regards, QC
I am trying to create a test function:
and the IDL definition:
However, I am not at all sure how to call this function through Haxe. Is it possible at the moment?