starandserpent / Voxel-demo

Demo implementation of Terra using Weltschmerz and Foreman
https://discord.starandserpent.com/
2 stars 1 forks source link

C++ integration #5

Open Pawlost opened 4 years ago

Pawlost commented 4 years ago

We should be able to integrate C++ into godot, gdnative and C#. Good implementation for this is FastNoise SIMD

Pawlost commented 4 years ago

ok I found that we can either import dymic class library (.dll) and use it in C# code, but this only supports static methods (article) For class initicialization we have to use C++/CLI wrapper. According to this article I think good option would be to create seperated projects for CLI wrappers

Pawlost commented 4 years ago

Also this solution is only for C# projects not sure how it will work with godot projects, but for example FastNoise is used in Weltschmerz, which is library not related to godot. So if we want to use it in such libraries we should follow C# options.

Pawlost commented 4 years ago

I need to do further research on gdnative but since we are not using gdscript I think we may be fine using only CLI

Pawlost commented 4 years ago

Also if we used C++ libraries as godot modules we would have to always build our own version of godot.

Pawlost commented 4 years ago

Seems like using CLR wrappers for C++ is broken in godot