Commit Graph

1303 Commits (7ed8ef7221082a045ecb6a3cea52102b68b70c37)

Author SHA1 Message Date
Rémi Verschelde 3ee07f652b
Merge pull request #355 from sheepandshepherd/variantleak
Fix leaks caused by implicitly-called copy constructors
2019-12-04 11:21:17 +01:00
sheepandshepherd 95feb486c9 Fix leaks caused by implicitly called copy constructors 2019-12-04 03:27:39 +01:00
bruvzg f314b47843
Add iOS build support. 2019-11-26 21:26:06 +02:00
Fabio Alessandrelli 91e9262210 Add godot namespace to references in Defs macros.
Was causing failed builds when used outside of the godot namespace.
2019-10-24 13:52:23 +02:00
sheepandshepherd 9560cbff09 Fix String::operator+ memory leak 2019-10-05 01:14:23 +02:00
Bastiaan Olij 123d9f0e92
Merge pull request #328 from TGRCdev/gdnative-android
Godot-cpp compile for Android
2019-09-22 09:33:11 +10:00
Bastiaan Olij 3352abf79e
Merge pull request #327 from BastiaanOlij/move_register
Call register types and init earlier
2019-09-19 17:56:13 +10:00
TGRCDev 7482074779 Android compile fixed for Windows 2019-09-18 11:01:54 -07:00
Jayanth-L 77cde5bb3a Add android support, Update README.md
Compiles and runs fine on Android platform
2019-09-18 10:44:46 -07:00
Bastiaan Olij 8443486a19 Call register types and init earlier 2019-09-14 11:24:15 +10:00
Bastiaan Olij 93df07289c Updated godot_headers to latest commit 4fa11f8c2a8029df7d6f30904297afcb42c4906c 2019-09-14 11:12:27 +10:00
Bastiaan Olij d0a4ddfd9f
Merge pull request #321 from BastiaanOlij/add_new_structs
Store all main entry points to the currently available APIs
2019-09-14 11:08:11 +10:00
Bastiaan Olij fc1fe720c3 Store all main entry points to the currently available APIs 2019-08-12 19:55:29 +10:00
Thomas Herzog c2ec46f64a
Merge pull request #296 from lupoDharkael/missing
Add missing class methods
2019-08-05 10:39:56 +02:00
lupoDharkael b895d3c326 Add missing class methods 2019-08-05 00:23:42 +02:00
Bastiaan Olij cdd50260d0
Merge pull request #295 from silverkorn/master
Add MSYS/MinGW compiling support on Windows
2019-06-16 16:38:31 +10:00
Bastiaan Olij 659a19b9a4 Updated to godot_headers 20190615 2019-06-15 20:33:57 +10:00
Bastiaan Olij 743100b401
Merge pull request #294 from aqnuep/error_msg
Error message improvements
2019-06-15 20:18:45 +10:00
Thomas Herzog 5bdcecfc20
Merge pull request #289 from 2shady4u/master
Fixed wrong implementation of Quat multiplication
2019-06-04 08:01:12 +02:00
Thomas Herzog 0220045268
Merge pull request #299 from bruvzg/macos_mingw
Fix MinGW-w64 cross-compilation on macOS.
2019-06-01 17:38:02 +02:00
lupoDharkael 6e5292c83d Update gitignore 2019-05-26 15:47:05 +02:00
bruvzg e080c5391e
Fix MinGW-w64 cross-compilation on macOS. 2019-05-25 15:23:36 +03:00
unknown 73c588456c Add MSYS/MinGW compiling support on Windows
Tested successfully with MSYS2 with the following command:
scons platform=windows generate_bindings=yes use_mingw=1 bits=64
2019-05-15 21:09:39 -04:00
Daniel Rakos bb4a837ad3 Error message improvements
Changed error message macros to actually use Godot's error reporting
facilities instead of outputting straight to stderr. This enables
GDNative errors to actually show up inside the editor.

Messages and set of available macros now also better matches that of
the engine itself.
2019-05-15 14:45:09 +02:00
shaderbeast 041b97e5b2 Fixed wrong implementation of Quat multiplication
Obeyed Clang format rules
2019-05-06 11:01:31 +02:00
Thomas Herzog 04548011e3
Merge pull request #286 from Calinou/add-travis-ci
Set up Travis CI
2019-05-03 08:29:11 +02:00
Hugo Locurcio c476d24b49
Set up Travis CI
This ensures the repository is always in a buildable state,
while also checking for code style violations.
2019-05-02 22:55:01 +02:00
Bastiaan Olij 12732b5391
Merge pull request #270 from Windfisch/add-variant-cast
Add a type conversion to Variant for anything that supports ___get_from_variant()
2019-05-02 23:03:06 +10:00
Bastiaan Olij 7defa6f77e
Merge pull request #271 from Windfisch/fix-register-property
Fix registering properties of reference-types by applying bruvzg's patch
2019-05-02 23:00:47 +10:00
Bastiaan Olij 877de75d8b
Merge pull request #282 from RameshRavone/patch-3
Fix snapped from Vector2
2019-05-02 23:00:25 +10:00
Bastiaan Olij 2d9d4be655 Sync with godot_headers master 20190502 2019-05-02 22:26:41 +10:00
Bastiaan Olij 3ffaada12a Linked to latest master of godot_headers 2019-05-02 21:50:20 +10:00
RameshRavone ca85ab244f
Fix snapped from Vector2 2019-05-02 09:57:28 +05:30
Thomas Herzog e4fb5ca2a5
Merge pull request #277 from RameshRavone/patch-2
Fix #272
2019-04-22 09:10:31 +02:00
RameshRavone 761d62c9c8
Fix #272 2019-04-21 06:55:49 +05:30
Bastiaan Olij 971adbd955
Merge pull request #266 from RameshRavone/pathch-1
fix shadows template parameter
2019-04-14 21:25:38 +10:00
Bastiaan Olij 834d88a0cd
Merge pull request #264 from aqnuep/random_fixes
Fix bug in Basis [] operator and add missing Transform-Vector3 * operator
2019-04-14 21:25:14 +10:00
Philip Whitfield 51233fa1a9 Update CMakeLists.txt
changes so this cmake file can be used as a subdirectory
```
add_subdirectory(godot-cpp)

project(project-name)
add_library(project-name SHARED src/init.cpp)
target_link_libraries(project-name godot-cpp)
```
2019-04-12 23:29:56 +10:00
Bastiaan Olij 7c8e42b56a
Merge pull request #262 from aqnuep/optimization
Optimizations to the generated bindings
2019-04-12 22:24:41 +10:00
Florian Jung 0b4be7bbfa Fix registering properties of reference-types by applying bruvzg's patch
bruvzg's original comment with the patch is here:
https://github.com/GodotNativeTools/godot-cpp/issues/237#issuecomment-465170294

Fixes #237.
2019-04-12 13:56:22 +02:00
Florian Jung c5199a2fbf Add a type conversion to Variant for anything that supports ___get_from_variant() 2019-04-12 13:55:56 +02:00
RameshRavone eb7a75b71e
fix shadows template parameter 2019-04-12 14:52:37 +05:30
Daniel Rakos 4be7fcdde5 Fix bug in Basis [] operator and add missing Transform-Vector3 * operator
The [] operator of Basis was returning a reference to a temporary, so fixed it.
There was no * operator in Transform equivalent to the xform function, which is
not in line with GDScript behavior.

Also fixed remaining cases where Transform relied on the old behavior of the
[] operator of Basis (i.e. that it returns the row, not the column).
2019-04-11 19:59:34 +02:00
Daniel Rakos 01606fa212 Optimizations to the generated bindings
This change gets rid of the call-time method binding query, instead it queries
all method bindings up-front at initialization time so that no extra cost is
added at function call time.

In addition, also converted the "icall" code to a header-only library so one
level of unnecessary call-stack is eliminated.

Also changed binding generator to use real_t instead of double everywhere
(except at the GDNative interface where unfortunately using doubles is hard-coded
on the engine side).

All this comes at a minimal increase in binary size (for the library, as actual
native modules might not even increase in size in practice).
2019-04-10 16:51:51 +02:00
Bastiaan Olij f0fe88bd36
Merge pull request #260 from aqnuep/basis_convention
Make Basis look column-major while retaining a row-major representation
2019-04-10 21:57:03 +10:00
Bastiaan Olij 65b3bcc833
Merge pull request #261 from Calinou/improve-buildsystem-2
Fix and improve the build system
2019-04-10 21:55:38 +10:00
Daniel Rakos abccf9a050 Make Basis look column-major while retaining a row-major representation
Per https://github.com/godotengine/godot/issues/14553:
Godot stores Basis in row-major layout for more change for efficiently
taking advantage of SIMD instructions, but in scripts Basis looks like and
is accessible in a column-major format.

This change modifies the C++ binding so that from the script's perspective
Basis does look like if it was column-major while retaining a row-major
in-memory representation. This is achieved using a set of helper template
classes which allow accessing individual columns whose components are
non-continues in memory as if it was a Vector3 type. This ensures script
interface compatibility without needing to transpose the Basis every time
it is passed over the script-engine boundary.

Also made most of the Vector2 and Vector3 class interfaces inlined in the
process for increased performance.

While unrelated (but didn't want to file a separate PR for it), this change
adds the necessary flags to have debug symbol information under MSVC.

Fixes #241.
2019-04-08 16:28:41 +02:00
Hugo Locurcio 976a188837
Fix and improve the build system
- Fix automatic architecture detection
- Fix compiling with MinGW on Linux
  - MinGW on Windows is still not working though
- Default to Clang on macOS
- Remove redundant `use_custom_api_file` option
- Format SConstruct using Flake8

This closes #245.
2019-04-07 15:40:49 +02:00
Bastiaan Olij df04c4097f
Merge pull request #259 from BastiaanOlij/update_3.1_stable
Synced with Godot 3.1 stable
2019-04-07 17:05:48 +10:00
Bastiaan Olij 459d3d28e4 Synced with Godot 3.1 stable 2019-04-07 17:59:53 +10:00