Re: Phix: cffi.e

new topic     » goto parent     » topic index » view thread      » older message » newer message
petelomax said...

In Phix I'd start with something like this (NB completely untested)

include cffi.e 
[...] 
 
-- I can tell you this kind of thing simply won't work: 
--constant xDrawCircleV = define_c_proc(ray,"+DrawCircleV",{VECTOR2,C_FLOAT,COLOR})  
-- instead: 
local constant xDrawCircleV = define_c_proc(ray,"+DrawCircleV",{C_PTR,C_FLOAT,C_PTR})  
  
[...] 

Thank you very much for the effort. My knowledge of the C programming language is very modest, but this will probably not work.

RLAPI void DrawCircleV(Vector2 center, float radius, Color color);   

As I understand it:

This Function Call needs the structur passed as Value, your code passes it as reference (C_PTR,Pointer)

many thanks

Andreas

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu