Posts: 187
Threads: 22
Joined: Dec 2020
Reputation:
1
Hello! I'm trying Tilengine on BeefLang by curiosity and I'm trying to do raster effects.
The thing is when I execute SetRasterCallback, it asks for a videocallback :
private static extern void TLN_SetRasterCallback(VideoCallback callback);
I have no idea how to use it. Do you know how to use it please? It's the same thing for C#.
Posts: 187
Threads: 22
Joined: Dec 2020
Reputation:
1
Is it the same method for the latest Tilengine version?
Posts: 673
Threads: 33
Joined: Jan 1970
Reputation:
13
It should be, yes. Isn't it working for you?
Posts: 187
Threads: 22
Joined: Dec 2020
Reputation:
1
because in the Java binding, I don't need to do that. It's just
tln.SetRasterCallback(object, string methodname);
and after, just create a method public void methodname(int line) and here you go!
It's much simpler.
Posts: 673
Threads: 33
Joined: Jan 1970
Reputation:
13
Java with JNI behaves different than other languages, you pass the string with the name of the Java method to invoke. The hard work is done inside the JNI bridge.
In other languages -like C#- you have to create the callback method as a type of object. In fact it's simpler that the Java way.
Posts: 673
Threads: 33
Joined: Jan 1970
Reputation:
13
I don't know Beef, so I can't give support about it. As I've read, it's originally based on C#, but it has some key differences, so it is NOT C#. Maybe you've hit one of those differences...