Commit Graph

874 Commits (bb5579d0758b717ec9ea3a9152ac3f09d7b48189)

Author SHA1 Message Date
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
Bastiaan Olij c714f99376
Merge pull request #235 from lzubiaur/fix-osx-arch
Set default arch to 64bits for osx platform
2019-04-07 15:48:22 +10:00
Thomas Herzog 05e5f5cd5e
Merge pull request #243 from PoignardAzur/patch-1
Add instructions to use submodules
2019-03-13 16:51:53 +01:00
Olivier FAURE a76df5c7d1
Add instructions to use submodules
Git submodules are a little tricky to use, but are the default
way to go when adding a github project as a dependency in C++.

Add instructions on how to add godot-cpp as a dependency when
working from an existing repository.
2019-03-13 15:56:53 +01:00
Thomas Herzog 422140dd61
Merge pull request #242 from touilleMan/correct-makefile-args
Fix Makefile platform and bits arguments passing to scons
2019-03-10 19:33:49 +01:00
Emmanuel Leblond 0fa4ad290d
Fix Makefile platform and bits arguments passing to scons 2019-03-10 12:38:55 +01:00
Thomas Herzog cfb4dcfad2
Merge pull request #239 from Calinou/use-markdown-license
Use Markdown format for the license
2019-02-25 08:41:42 +01:00
Hugo Locurcio 45a9f58f5e
Use Markdown format for the license 2019-02-24 15:57:29 +01:00
lzubiaur e0295d7cd4 Set default arch to 64bits for osx platform 2019-02-12 08:32:26 +09:00
Thomas Herzog 2a4e82b77e
Merge pull request #229 from arimus/binding-typename-fix
escape 'typename' keyword, which is causing errors when generating bindings
2019-02-04 08:46:19 +01:00
David Castro 30500632b1 escape 'typename' keyword, which is causing errors when generating bindings 2019-02-03 17:55:16 -08:00
Bastiaan Olij 262d53c05e
Merge pull request #221 from bruvzg/rect2_pos
Renamed Rect2::pos to Rect2::position
2018-12-28 20:19:44 +11:00
bruvzg aad175aa09
Renamed Rect2::pos to Rect2::position 2018-12-13 11:10:25 +02:00
Bastiaan Olij 342593c78d
Merge pull request #187 from Acclution/cmake
Added cmake build script
2018-12-04 21:58:26 +11:00
Acclution 7a22fd0a78 Updated cmake to the new nativescript 1.1 2018-12-02 22:14:26 +01:00
Bastiaan Olij a3b936d3b6
Merge pull request #210 from bruvzg/fix_custom_subclass_tags
Fix tags/cast_to for custom subclasses.
2018-12-03 07:48:19 +11:00
Bastiaan Olij 607b8326a3
Merge pull request #214 from marcelofg55/scons_improv_mf
Improvements on SConstruct arch detection
2018-12-02 09:29:07 +11:00
Marcelo Fernandez 2500f308a9 Improvements on SConstruct arch detection 2018-11-28 14:19:50 -03:00
Bastiaan Olij bcc39bbf4b
Merge pull request #212 from BastiaanOlij/fix_sconstruct
Fixing a few typos in SConstruct
2018-11-28 11:06:32 +11:00
Bastiaan Olij d3d78df0b5 Fixing a few typos in SConstruct 2018-11-28 11:05:27 +11:00
bruvzg 0af05a45ce
Fix tags/cast_to for custom subclasses. 2018-11-28 00:08:45 +02:00
Bastiaan Olij 295950efd4
Merge pull request #208 from willnationsdev/scons
Replace ARGUMENTS with opts.Add/env and some cleanup
2018-11-28 08:52:38 +11:00
Bastiaan Olij 6fb835c312
Merge pull request #174 from marcelofg55/profiling_data
Profiling support
2018-11-28 08:50:42 +11:00
Marcelo Fernandez 209dd56cb0 Profiling support 2018-11-27 09:45:56 -03:00
Bastiaan Olij f4476351f0
Merge pull request #207 from bruvzg/more_nulls
Fix NULL dereferencing in get_from_variant and cast_to
2018-11-27 09:25:47 +11:00
bruvzg be5a012ff7
Fix NULL dereferencing in get_from_variant and cast_to 2018-11-26 08:11:31 +02:00
Will Nations 7dff130849 Replace ARGUMENTS with opts.Add/env and some cleanup 2018-11-25 23:29:30 -06:00
Bastiaan Olij 5225ab2bac
Merge pull request #206 from BastiaanOlij/add_clang_format
Implementing clang-format and applying it to all classes
2018-11-26 11:24:59 +11:00
Bastiaan Olij fc20fa3fce Implementing clang-format and applying it to all classes 2018-11-24 09:09:41 +11:00
Bastiaan Olij 0a6f5d052a
Merge pull request #205 from BastiaanOlij/advance_godot_headers
Hopefully last time for awhile, new godot_headers
2018-11-24 07:58:22 +11:00