-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
raylib + LoadTexture #221
Comments
If you return a structure larger than one stack slot, it will overlap into the parameters. I recommend passing a return pointer for larger structures. |
@RobLoach A function that returns a structured result always has a hidden last parameter (a pointer to where the result should be stored in the caller). So this hidden parameter will be However, your code seems to be assuming that you allocate the memory for the returned value in the callee, not the caller. Then you should return |
Thanks so much for the help! That fixed it. I've created a follow up issue to switch the API to return pointers like |
Thanks for the inspiration with the Playground! Got something up and running over at https://robloach.github.io/raylib-umka/ 🚀 |
Hey @vtereshkov... Saw you put together some small raylib examples, and I kind of built off of your idea here with raylib-umka, with a goal of supporting the entire raylib API through Umka 🚀
Ran into an issue though with
Texture LoadTexture(const char* fileName)
...One would expect it to be
params[0].ptrVal
sincefileName
is the only parameter for the function. Do you know if I'm doing something wrong? I've created a Pull Request to demonstrate the change over at RobLoach/raylib-umka#10 .The text was updated successfully, but these errors were encountered: