Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

How to repurpose this repos for C# binding to GDExtension of GDMP? #1

Closed
GeorgeS2019 opened this issue Jun 3, 2023 · 2 comments
Closed

Comments

@GeorgeS2019
Copy link

GeorgeS2019 commented Jun 3, 2023

[configuration]

entry_symbol = "mediapipe_library_init"

[libraries]

linux.debug.x86_64 = "res://addons/GDMP/libs/x86_64/libGDMP.so"
linux.release.x86_64 = "res://addons/GDMP/libs/x86_64/libGDMP.so"
windows.debug.x86_64 = "res://addons/GDMP/libs/x86_64/GDMP.dll"
windows.release.x86_64 = "res://addons/GDMP/libs/x86_64/GDMP.dll"
@antonWetzel
Copy link
Owner

antonWetzel commented Jun 5, 2023

I wrote these bindings to see how the API works.
I do not plan to maintain the bindings at the moment and probably won't in the future.

I think (with limited knowledge) that the best solution is

  • generate bindings in for csharp which call into the registered functions
namespace GDMP {
    class SomeCoolObject {
        private GD.Object data;
         
        public SomeCoolObject() { this.data = GD.Instantiate("GDMPSomeCoolObject"); }

        public SomeType SomeFunction() {
            return (SomeType)this.data.call("some_function");
        }
    }
}
  • I have no clue how to Godot API calls should look like (GD.Object, GD.Instantiate, ...) are just guesses, but I think the functionality should exist.
  • if the API from GDMP is small
    • manually write a csharp bindings
  • else
    • write own bindings generator
    • this repository might be used to see how bindings can be generated, but better solutions should be searched first

@GeorgeS2019
Copy link
Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants