![]() |
|
XP is just a number | |
PerlMonks |
Calling C function from Rakuby BenM (Initiate) |
on Mar 18, 2020 at 11:37 UTC ( #11114426=perlquestion: print w/replies, xml ) | Need Help?? |
BenM has asked for the wisdom of the Perl Monks concerning the following question: Hi, I'm quite new to Raku and I was wondering if anyone could point me in the right direction with using the C FFI. I have been having some difficulty getting the C graphics library Raylib (https://github.com/raysan5/raylib) up and running. I've been aiming to get a basic window open with text displayed (https://www.raylib.com/examples/web/core/loader.html?name=core_basic_window) but have been having issues with clearing the screen buffer with a specified color, as well as not being able to see the text from the "DrawText" function. The color that appears seems to be random. I was originally thinking it was possibly from the conversion of the "unsigned char" to a "uint8" within Raku, but they should be the same size in memory and I haven't managed to find a solution to the issue yet. I have a raylib.dll from a github release within the same folder and I am currently on Windows 64 bit. The relevant C function signatures from raylib.h are:
And the Raku code that I was testing:
Any pointers to what may be causing the issue would be greatly appreciated!
Back to
Seekers of Perl Wisdom
|
|