What do I need to study in order to use GDNative with c++?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By hidemat

Obviously I need to learn c++, but do I need to look into Open GL for example? Are the GDscript functions usable in GDNative?

:bust_in_silhouette: Reply From: Xrayez

You shouldn’t worry about learning any of the graphics related API like OpenGL with Godot, unless you have good reasons. Learning OpenGL might be beneficial to some extent, but If you simply want to develop games, I think it’s a waste of time. Why use an engine in the first place?

Most methods that have bindings will be accessible from GDNative, so most of the stuff you see in the docs should be available in GDNative. I’m on my way to learning the basics of GDNative as well.

I would advice to learn creating some simple C++ modules first and get familiar with the engine internals (basic datatypes, Variant, Object, Reference, the use of Ref<YourClass>, Pool.*Arrays, List<Datatype>, Vector<Datatype>see here, because I think it’s more documented than GDNative now, and the amount of work to setup GDNative seems more convoluted compared to creating a module. Plus you’ll get a benefit from your code being able to run on all platforms, unlike GDNative stuff where you need to compile dynamic libraries for each platform yourself (and web export is not guaranteed to work either).

Depending on whether you can program in other languages, from my experience having C++ as first language isn’t that hard, it just takes more time to grasp it.

Thanks. I will try looking into learning c++ and creating modules then. Cheers. :slight_smile:

hidemat | 2019-04-22 18:18