godot/modules/gltf
Rémi Verschelde 39facb35a0 SCons: Unify tools/target build type configuration
Implements https://github.com/godotengine/godot-proposals/issues/3371.

New `target` presets
====================

The `tools` option is removed and `target` changes to use three new presets,
which match the builds users are familiar with. These targets control the
default optimization level and enable editor-specific and debugging code:

- `editor`: Replaces `tools=yes target=release_debug`.
  * Defines: `TOOLS_ENABLED`, `DEBUG_ENABLED`, `-O2`/`/O2`
- `template_debug`: Replaces `tools=no target=release_debug`.
  * Defines: `DEBUG_ENABLED`, `-O2`/`/O2`
- `template_release`: Replaces `tools=no target=release`.
  * Defines: `-O3`/`/O2`

New `dev_build` option
======================

The previous `target=debug` is now replaced by a separate `dev_build=yes`
option, which can be used in combination with either of the three targets,
and changes the following:

- `dev_build`: Defines `DEV_ENABLED`, disables optimization (`-O0`/`/0d`),
  enables generating debug symbols, does not define `NDEBUG` so `assert()`
  works in thirdparty libraries, adds a `.dev` suffix to the binary name.

Note: Unlike previously, `dev_build` defaults to off so that users who
compile Godot from source get an optimized and small build by default.
Engine contributors should now set `dev_build=yes` in their build scripts or
IDE configuration manually.

Changed binary names
====================

The name of generated binaries and object files are changed too, to follow
this format:

`godot.<platform>.<target>[.dev][.double].<arch>[.<extra_suffix>][.<ext>]`

For example:
- `godot.linuxbsd.editor.dev.arm64`
- `godot.windows.template_release.double.x86_64.mono.exe`

Be sure to update your links/scripts/IDE config accordingly.

More flexible `optimize` and `debug_symbols` options
====================================================

The optimization level and whether to generate debug symbols can be further
specified with the `optimize` and `debug_symbols` options. So the default
values listed above for the various `target` and `dev_build` combinations
are indicative and can be replaced when compiling, e.g.:

`scons p=linuxbsd target=template_debug dev_build=yes optimize=debug`
will make a "debug" export template with dev-only code enabled, `-Og`
optimization level for GCC/Clang, and debug symbols. Perfect for debugging
complex crashes at runtime in an exported project.
2022-09-26 16:31:46 +02:00
..
doc_classes Add a way to get the GLTF extensions supported by GLTFDocumentExtension 2022-09-19 19:40:06 -05:00
editor Rename String plus_file to path_join 2022-08-29 19:38:13 -05:00
extensions Minor enhancements to the GLTF module (lights and docs) 2022-09-18 22:33:21 -05:00
structures Don't try to read values from null cameras and lights in GLTF 2022-09-04 09:52:25 -05:00
config.py Add fbx2gltf support for importing .fbx files 2022-03-30 15:22:46 +02:00
gltf_defines.h Minor enhancements to the GLTF module (lights and docs) 2022-09-18 22:33:21 -05:00
gltf_document.cpp Add a way to get the GLTF extensions supported by GLTFDocumentExtension 2022-09-19 19:40:06 -05:00
gltf_document.h Make used extensions stored in GLTFState 2022-09-19 19:39:49 -05:00
gltf_document_extension.cpp Add a way to get the GLTF extensions supported by GLTFDocumentExtension 2022-09-19 19:40:06 -05:00
gltf_document_extension.h Add a way to get the GLTF extensions supported by GLTFDocumentExtension 2022-09-19 19:40:06 -05:00
gltf_document_extension_convert_importer_mesh.cpp Improve gltf extension GLTFDocument api. 2022-05-20 06:58:48 -07:00
gltf_document_extension_convert_importer_mesh.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
gltf_state.cpp Make used extensions stored in GLTFState 2022-09-19 19:39:49 -05:00
gltf_state.h Make used extensions stored in GLTFState 2022-09-19 19:39:49 -05:00
gltf_template_convert.h Replace Array return types with TypedArray 3 2022-08-24 12:53:36 +02:00
README.md GLTF: Organize structures into a subfolder 2022-07-24 17:16:51 -05:00
register_types.cpp Fix some errors affecting the Web editor 2022-09-12 16:29:45 +02:00
register_types.h Style: Cleanup header guards for consistency 2022-09-26 13:51:17 +02:00
SCsub SCons: Unify tools/target build type configuration 2022-09-26 16:31:46 +02:00

Godot GLTF import and export module

In a nutshell, the GLTF module works like this:

  • The structures/ folder contains GLTF structures, the small pieces that make up a GLTF file, represented as C++ classes.
  • The extensions/ folder contains GLTF extensions, which are optional features that build on top of the base GLTF spec.
  • GLTFState holds collections of structures and extensions.
  • GLTFDocument operates on GLTFState and its elements.
  • The editor/ folder uses GLTFDocument to import and export 3D models.