Skip to content

Commit 7c7ee2f

Browse files
committed
GDExtension docs
1 parent 68f61b3 commit 7c7ee2f

22 files changed

+37
-40
lines changed

tutorials/scripting/gdnative/gdnative_c_example.rst renamed to tutorials/scripting/gdextension/gdextension_c_example.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _doc_gdnative_c_example:
22

3-
GDNative C example
3+
GDExtension C example
44
==================
55

66
Introduction

tutorials/scripting/gdnative/gdnative_cpp_example.rst renamed to tutorials/scripting/gdextension/gdextension_cpp_example.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
.. _doc_gdnative_cpp_example:
1+
.. _doc_gdextension_cpp_example:
22

3-
GDNative C++ example
3+
GDExtension C++ example
44
====================
55

66
Introduction
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
GDExtension
2+
========
3+
4+
.. toctree::
5+
:maxdepth: 1
6+
:name: toc-tutorials-gdextension
7+
8+
what_is_gdextension
9+
gdextension_c_example
10+
gdextension_cpp_example
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,74 @@
1-
.. _doc_what_is_gdnative:
1+
.. _doc_what_is_gdextension:
22

3-
What is GDNative?
3+
What is GDExtension?
44
=================
55

66
Introduction
77
------------
88

9-
**GDNative** is a Godot-specific technology that lets the engine interact with
9+
**GDExtension** is a Godot-specific technology that lets the engine interact with
1010
native `shared libraries <https://en.wikipedia.org/wiki/Library_(computing)#Shared_libraries>`__
1111
at run-time. You can use it to run native code without compiling it with the engine.
1212

13-
.. note:: GDNative is *not* a scripting language and has no relation to
13+
.. note:: GDExtension is *not* a scripting language and has no relation to
1414
:ref:`GDScript <doc_gdscript>`.
1515

16-
Differences between GDNative and C++ modules
16+
Differences between GDExtension and C++ modules
1717
--------------------------------------------
1818

19-
You can use both GDNative and :ref:`C++ modules <doc_custom_modules_in_c++>` to
19+
You can use both GDExtension and :ref:`C++ modules <doc_custom_modules_in_c++>` to
2020
run C or C++ code in a Godot project.
2121

2222
They also both allow you to integrate third-party libraries into Godot. The one
2323
you should choose depends on your needs.
2424

25-
Advantages of GDNative
25+
Advantages of GDExtension
2626
^^^^^^^^^^^^^^^^^^^^^^
2727

28-
Unlike modules, GDNative doesn't require compiling the engine's source code,
28+
Unlike modules, GDExtension doesn't require compiling the engine's source code,
2929
making it easier to distribute your work. It gives you access to most of the API
3030
available to GDScript C#, allowing you to code game logic with full control
3131
regarding performance. It's ideal if you need high-performance code you'd like
3232
to distribute as an add-on in the :ref:`asset library <doc_what_is_assetlib>`.
3333

3434
Also:
3535

36-
- GDNative is not limited to C and C++. Thanks to :ref:`third-party bindings
36+
- GDExtension is not limited to C and C++. Thanks to :ref:`third-party bindings
3737
<doc_what_is_gdnative_third_party_bindings>`, you can use it with many other
3838
languages.
39-
- You can use the same compiled GDNative library in the editor and exported
39+
- You can use the same compiled GDExtension library in the editor and exported
4040
project. With C++ modules, you have to recompile all the export templates you
4141
plan to use if you require its functionality at run-time.
42-
- GDNative only requires you to compile your library, not the whole engine.
42+
- GDExtension only requires you to compile your library, not the whole engine.
4343
That's unlike C++ modules, which are statically compiled into the engine.
4444
Every time you change a module, you need to recompile the engine. Even with
45-
incremental builds, this process is slower than using GDNative.
45+
incremental builds, this process is slower than using GDExtension.
4646

4747
Advantages of C++ modules
4848
^^^^^^^^^^^^^^^^^^^^^^^^^
4949

5050
We recommend :ref:`C++ modules <doc_custom_modules_in_c++>` in cases where
51-
GDNative isn't enough:
51+
GDExtension isn't enough:
5252

53-
- C++ modules provide deeper integration into the engine. GDNative's access is
54-
limited to what the scripting API exposes.
53+
- C++ modules provide deeper integration into the engine. GDExtension's access is not as deep as
54+
static modules
5555
- You can use C++ modules to provide additional features in a project without
5656
carrying native library files around. This extends to exported projects.
57-
- C++ modules are supported on all platforms. In contrast, GDNative has only
58-
limited support on HTML5 (cannot be used together with multi-threading), and
59-
is not supported on Universal Windows Platform (UWP).
60-
- C++ modules can be faster than GDNative, especially when the code requires a
61-
lot of communication through the scripting API.
57+
(- C++ modules can be faster than GDNative, especially when the code requires a
58+
lot of communication through the scripting API.) -> TODO: check if this still holds up
6259

6360
Supported languages
6461
-------------------
6562

6663
The Godot developers officially support the following language bindings for
67-
GDNative:
64+
GDExtension:
6865

6966
- C++ :ref:`(tutorial) <doc_gdnative_cpp_example>`
7067
- C :ref:`(tutorial) <doc_gdnative_c_example>`
7168

7269
.. note::
7370

74-
There are no plans to support additional languages with GDNative officially.
71+
There are no plans to support additional languages with GDExtension officially.
7572
That said, the community offers several bindings for other languages (see
7673
below).
7774

@@ -98,9 +95,9 @@ The bindings below are developed and maintained by the community:
9895
Version compatibility
9996
---------------------
10097

101-
:ref:`Unlike Godot itself <doc_release_policy>`, GDNative has stricter version
102-
compatibility requirements as it relies on low-level *ptrcalls* to function.
98+
(:ref:`Unlike Godot itself <doc_release_policy>`, GDExtension has stricter version
99+
compatibility requirements as it relies on low-level *ptrcalls* to function.) -> TODO: check up on this
103100

104-
GDNative add-ons compiled for a given Godot version are only guaranteed to work
105-
with the same minor release series. For example, a GDNative add-on compiled for
106-
Godot 3.4 will only work with Godot 3.4, 3.4.1, 3.4.2… but not Godot 3.3 or 3.5.
101+
GDExtension add-ons compiled for a given Godot version are only guaranteed to work
102+
with the same minor release series. For example, a GDExtension add-on compiled for
103+
Godot 4.0 will only work with Godot 4.0, 4.0.1, 4.0.2… but not Godot 3.5 or 3.6.

tutorials/scripting/gdnative/index.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)