Commit Graph

821 Commits (cd2232eddf82d609e3d2de39011c4a6a6fdafe57)

Author SHA1 Message Date
Aaron Franke 76ad89fe0b
Generate constants in the bindings generator 2022-09-02 21:32:38 -05:00
Rémi Verschelde 862d1f1fdd
Merge pull request #823 from Faless/fix/godot_namespace_requirement 2022-09-02 09:16:59 +02:00
Fabio Alessandrelli 02cdec2f91
Merge pull request #824 from clayjohn/updatea15
Update extension api to alpha 15
2022-09-01 22:07:09 +02:00
clayjohn f64c049f0c Update extension api to alpha 15 2022-09-01 11:24:31 -07:00
Rémi Verschelde 162705fbed
Merge pull request #822 from zhehangd/fix_basis 2022-09-01 09:36:55 +02:00
Fabio Alessandrelli bcf27d8af4 Ensure GDCLASS can be used outside the godot namespace.
The `GDCLASS` macro should not assume to be called inside the `godot`
namespace and should thus prefix function calls for that namespace with
`::godot::` to ensure proper namespace referencing.
2022-09-01 04:11:23 +02:00
Zhehang Ding 6d1073d867 Basis constructor: row vectors -> column vectors
https://github.com/godotengine/godot-proposals/issues/5295
2022-08-31 19:06:07 -07:00
Rémi Verschelde 1863bd88ad
Merge pull request #703 from AlphaSoftLLC/fix_struct_forward_declaration 2022-08-31 13:04:03 +02:00
Rémi Verschelde 24f97739a1
Merge pull request #816 from bruvzg/get_set_props 2022-08-23 21:38:16 +02:00
Rémi Verschelde 9220e9dd34 Relicense integration testing project under public domain/Unlicense
Fixes #813.
2022-08-22 18:20:11 +02:00
bruvzg 270ad28931
Add support for `_notification`, `_set`, `_get`, `_get_property_list`, `_property_can_revert`, `_property_get_revert`, and `_to_string` methods. 2022-08-22 12:59:38 +03:00
bruvzg f454253005
Merge pull request #814 from YuriSizov/object-expose-property-revert
Add support for `property_*_revert` methods
2022-08-19 18:48:37 +03:00
Yuri Sizov fa111d7078 Add support for `property_*_revert` methods 2022-08-18 16:43:01 +03:00
Rémi Verschelde 8498f64a50 headers: Sync with upstream commit 11abffbf1 2022-08-10 17:43:20 +02:00
Rémi Verschelde 8ba1c059da
Merge pull request #803 from RiederAlex/fix-export-not-working
Fix wrong specifiers & filepaths in .gdextension, breaking the export
2022-08-07 19:19:12 +02:00
Alexander Rieder 4c85682c9d Fix wrong filepaths in .gdextension, breaking the export 2022-08-07 16:48:00 +02:00
Rémi Verschelde 9e210c1a02
Merge pull request #799 from Kev/qualify-classdb-friend
Allow GDCLASS in own namespaces
2022-07-31 15:14:22 +02:00
Kevin Smith fd8173f109 Allow GDCLASS in own namespaces
The unqualified ClassDB friending was causing (at least for me on
VS2022) an implicit forward declaration of ClassDB in the namespace
of my class, instead of using the godot namespaced one. By qualifying
the namespace, this compiles for me.

Test-Information:
My project builds now.
2022-07-31 11:54:40 +01:00
Fabio Alessandrelli 9aa129caab
Merge pull request #796 from Kev/windows-debug-symbols
Add debug information to Windows builds
2022-07-29 15:46:46 +02:00
Rémi Verschelde 54e1385729
Merge pull request #798 from Faless/fix/4.x_no_memnew_cb 2022-07-29 13:51:05 +02:00
Fabio Alessandrelli 78cbae910d Fix "_instance_bindings != nullptr" for Wrapped objects.
This is an attempt to make the lifecycle of wrapped objects clearer.
Godot keeps track of bindings' userdata for each object it creates.
This allows allocating the memory of the wrapper only once per object
even if that object is passed multiple times between binding code and
godot code.

The binding information is composed of multiple functions, this includes
a callback for when the userdata is to be allocated (called once) and
for when the userdata is to be deallocated (again, called once).

When allocating data with "memnew" we set the object bindings during the
postinitialize phase, but surely we shouldn't do that when allocating
the userdata as a result of bindings callback themselves.

Additionally, since we let Godot handle (and track) raw memory
allocation and de-allocation, we need to manually call the deconstructor
of the wrapper class during the free callback, to ensure that its
non-trivial members are correctly de-initialized.
2022-07-29 02:36:12 +02:00
Fabio Alessandrelli 8d4de1b537
Merge pull request #677 from lukas-toenne/fix_object_ptr_args
Fixed pointer indirection in the PtrToArg template for Object arguments.
2022-07-29 01:17:34 +02:00
Kevin Smith 7f44a1b44e Add debug information to Windows builds
Previously, Windows builds were being produced without debug
information, leading to somewhat unhelpful backtraces etc.
without symbols.

This builds the symbols in (only for debug builds - I've
deliberately not touched release builds here) so gdextension
bugs are a little more tractable.

Test-Information:
Have been running this patch for weeks, and getting useful
traces out on the commandline, and useful debugging from
debuggers.
2022-07-28 20:37:44 +01:00
Rémi Verschelde 89ca5440a2 headers: Sync with upstream commit 7281f0f23 2022-07-28 13:09:47 +02:00
Rémi Verschelde 80a5c4f322
Merge pull request #797 from Faless/fix/4.x_android_ci 2022-07-28 09:34:18 +02:00
Fabio Alessandrelli 0943dfc34a [CI] Fix Android builds after GH container update. 2022-07-28 06:30:04 +02:00
Rémi Verschelde 59fca06354 headers: Sync with upstream commit cc5135959 2022-07-27 14:36:57 +02:00
Rémi Verschelde e87eb347ae Git hooks: Remove reference to unused `pre-commit-make-rst`
Fixes #795.
2022-07-26 10:21:08 +02:00
Fabio Alessandrelli dcd4460c88
Merge pull request #794 from DNKpp/master
Object::cast_to checks provided object for nullptr
2022-07-26 09:24:57 +02:00
DNKpp 95574c1b11 fix: Object::cast_to checks provided object for nullptr 2022-07-26 00:41:57 +02:00
Rémi Verschelde 3cc1409210
Merge pull request #793 from bruvzg/v4_v4i_proj 2022-07-25 11:14:45 +02:00
Rémi Verschelde a0b6203854
Merge pull request #790 from bruvzg/mac_rename 2022-07-21 10:25:43 +02:00
bruvzg 91c56a0ad1
Add bindings for Vector4, Vector4i, Projection built-in types. 2022-07-21 09:36:38 +03:00
bruvzg 0ee980abae
Rename OSX to macOS. 2022-07-20 11:01:47 +03:00
Rémi Verschelde 8772a7faca
Merge pull request #686 from ondy-personal/patch-1 2022-07-18 15:48:17 +02:00
Rémi Verschelde 4bd0dab16b
Merge pull request #687 from jtcooper10/cmake-default-build-type-fix 2022-07-18 13:59:29 +02:00
Joshua Cooper 165ad14b0f CMake: fix CMAKE_BUILD_TYPE and BITS check 2022-07-18 13:01:04 +02:00
Rémi Verschelde 9b4519280a CMake: Fixup build after #732 2022-07-18 12:58:50 +02:00
Rémi Verschelde 3c73d1a7a2
CMake: Don't use `-fPIC` on Windows (#732) 2022-07-18 11:55:30 +02:00
Rémi Verschelde c7a30aec03 CI: Use setup-python@v4 2022-07-18 11:42:01 +02:00
Rémi Verschelde c2b35fb226 Makefile: Dehardcode -j4, SCons defaults to max - 1
Follow-up to #788.
2022-07-18 11:40:52 +02:00
Rémi Verschelde 3ceb321b8e
Merge pull request #788 from akien-mga/scons-num_jobs-default-max 2022-07-17 15:43:50 +02:00
Rémi Verschelde cdcd473371 SCons: Default `num_jobs` to max CPUs minus 1 if not specified
This doesn't change the behavior when `--jobs`/`-j` is specified as a
command-line argument or in `SCONSFLAGS`.

The SCons hack used to know if `num_jobs` was set by the user is derived
from the MongoDB setup.

We use `os.cpu_count()` for portability (available since Python 3.4).

With 4 CPUs or less, we use the max. With more than 4 we use max - 1 to
preserve some bandwidth for the user's other programs.
2022-07-17 12:37:13 +02:00
Rémi Verschelde 17c1d1fd50 headers: Sync with upstream commit 9904a9db5 2022-07-15 09:57:17 +02:00
Rémi Verschelde c0fead40e9
Merge pull request #774 from Naryosha/patch-1 2022-07-14 23:59:53 +02:00
Rémi Verschelde cc1a2e1986 headers: Sync with upstream commit 2c11e6d9e (4.0-alpha12) 2022-07-14 23:51:09 +02:00
Rémi Verschelde 9fc3fd7196
Merge pull request #783 from bruvzg/bitfields 2022-07-14 23:49:27 +02:00
Fabio Alessandrelli cdc8f74939
Merge pull request #782 from Kev/build/support-clang-cl
Add clang-cl support
2022-07-12 21:58:24 +02:00
Kevin Smith b038fe556b Add clang-cl support
Visual C++ has a clang-based driver, available through the
clang-cl wrapper (which provides the same interface as
cl) - this generates objects binary-compatible with the
default (traditional) driver, and can then be linked in
the normal way. As such, this patch simply configures for
MSVCC and then overwrites the cl compiler with clang-cl
in the environment.

Clang gives (subjectively) much more understandable compiler warnings
and errors than MSVCC, which was my motivation for switching.

Test-Information:
Builds for me with VS2022, and my gdextension library
builds and links.
2022-07-12 18:13:25 +01:00
bruvzg 713b122b84
Add support for BitField hint, sync API files. 2022-07-11 15:00:17 +03:00