foreignsasquatch / raylib-hx

Haxe bindings for raylib, a simple and easy-to-use library to learn videogame programming
https://raylib.com
zlib License
56 stars 12 forks source link

Invalid signature of DrawTextureRec #24

Closed mcjlnrtwcz closed 2 years ago

mcjlnrtwcz commented 2 years ago

Hi! :wave: It's my first day with haxe and raylib. I tried to draw an image and I had a problem with using DrawTextureRec. According to the cheatsheet the function should accept a vector and a rectangle, but the bindings say that it should be two rectangles.

Compare this

void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint);  // Draw a Texture2D with extended parameters

to this

@:native("DrawTextureRec") static function DrawTextureRec(texture:Texture2D, source:Rectangle, dest:Rectangle, tint:Color):Void;

So it seems like there's a bug in the version available for haxe? :thinking:

Cheers!

foreignsasquatch commented 2 years ago

Are you using the latest git version? the code seems to be correct here: https://github.com/foreignsasquatch/raylib-hx/blob/main/source/Rl.cpp.hx#L1568 with the c raylib code https://github.com/raysan5/raylib/blob/master/src/raylib.h#L1315

foreignsasquatch commented 2 years ago

Gonna close this