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.
- 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.
implemented instance binding data usage
This commit changes the way C++ wrapper classes work.
Previously, wrapper classes were merely wrapper *interfaces*.
They used the `this` pointer to store the actual foreign Godot
Object.
With the NativeScript 1.1 extension it is now possible to have
low-overhead language binding data attached to Objects.
The C++ bindings use that feature to implement *proper* wrappers
and enable regular C++ inheritance usage that way.
Some things might still be buggy and untested, but the C++
SimpleDemo works with those changes.
new and free change, custom free will crash engine, be wary
fix exporting of non-object types
fix free() crash with custom resources
added type tags and safe object casting
fix global type registration order
fix cast_to
changed build system to be more self contained
updated .gitignore
use typeid() for type tags now
fix indentation in bindings generator
remove accidentally added files
fix gitignore
Fixed up registering tool and updated godot_headers
Fix crash when calling String::split/split_floats
Was casting to the wrong object type.
Also adds parse_ints function to String with the same logic
Better warning/error macros
Change gitignore so we get our gen folders
New documentation based on nativescript 1.1
Fixed GODOT_SUBCLASS macro
Preventing crash when function returned null ptr
Adds needed include <typeinfo>
Solves this issue #168 due to not having the include of typeinfo
Fix compile error of 'WARN_PRINT' and 'ERR_PRINT'.
cannot pass non-trivial object of type 'godot::String' to variadic function; expected type from format string was 'char *' [-Wnon-pod-varargs]
update vector3::distance_to
Remove godot_api.json as its now in the godot_headers submodule (api.json)
- The SCons option system is now used for validation
- An help message can now be displayed using `scons -h`
- New `use_mingw` option to compile using MinGW on Windows
- Removed `arch` in favor of `bits`
- Renamed `headers` to `headers_dir`
- Built libraries now contain the target in the file name
This adds MSVC compiler flags to enable the DEBUG/NDEBUG defines, enable exceptions, turn on optimizations for Release builds, and link to the correct runtime library
This ensures that environment variables are kept when on windows meaning you can run it with any version of VS, so long as you are in a VS prompt or have run the vcvars.bat file for your architecture