electronstudio / jaylib

Java JNI bindings for Raylib
Other
113 stars 21 forks source link

`rlLoadFramebuffer` takes arguments, whereas in Raylib-C it does not? #51

Closed xzripper closed 3 months ago

xzripper commented 3 months ago

rlLoadFramebuffer signature:

RLAPI unsigned int rlLoadFramebuffer(void);                               // Load an empty framebuffer

Usage:

unsigned int fbo = rlLoadFramebuffer();

Java rlLoadFramebuffer signature:

@Cast({"unsigned int"})
public static native int rlLoadFramebuffer(int var0, int var1);

What do the arguments var0 and var1 mean? Where are they used if the function is used to load an empty buffer?

electronstudio commented 3 months ago

The C function takes two arguments:

https://github.com/raysan5/raylib/blob/ae50bfa2cc569c0f8d5bc4315d39db64005b1b08/src/rlgl.h#L714

xzripper commented 3 months ago

I see that the latest 5.0 Jaylib release still has 4.5 RLGL, so is there any way to upgrade RLGL to 5.0?

electronstudio commented 3 months ago

Also the Java version is documented here https://electronstudio.github.io/jaylib/com/raylib/Raylib.html#rlLoadFramebuffer(int,int)

That is the version of RLGL that shipped with the Raylib 5.0 release. Raylib versioning is a mess because it’s purely for marketing. they even reuse the same version number for bug fix releases. so I wouldn’t pay much attention to the number or expect them to match.

electronstudio commented 3 months ago

It looks like they updated the version number of RLGL to 5.0 shortly after the release without making any other changes, so what you have in Raylib/Jaylib 5.0 is effectively RLGL 5.0.

If you want a newer version you can wait for Raylib/Jaylib 5.1 (which will probably be given some inflated version number like 5.5) or else you can build your own copy of Jaylib using the GitHub development version of Raylib.

xzripper commented 3 months ago

Thank you for reply!