This also fixes RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME for the RD renderers as it was incorrectly reporting vertex/index count at times
This also adds memory tracking to textures and buffers to catch memory leaks.
This also cleans up some memory leaks that the new system caught.
It was possible to unpress a button group that had `allow_unpress = false`
using shortcuts.
Adjust `BaseButton::shortcut_input` to use the same logic as
`BaseButton::on_action_event`.
- Adds a workaround/code example too.
- Fixes#58912 (the issue itself is not a bug, but the solution was to add a documentation entry about the "issue")
This usually means that an `ERR_FILE*` error occurred.
Previously, using `GDScriptCache::get_full_script()` would ignore errors during loading.
Now, all errors are not ignored.
Judging in which period the error occurred, it can be judged based on the return value:
1. null + err : Error during script loading (load_source_code()).
2. script + err: Error during script parsing.
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:
Includes from the platform port or module ("local" includes) should be listed
first in their own block using relative paths, before Godot's "core" includes
which use "absolute" (project folder relative) paths, and finally thirdparty
includes.
Includes in `#ifdef`s come after their relevant section, i.e. the overall
structure is:
- Local includes
* Conditional local includes
- Core includes
* Conditional core includes
- Thirdparty includes
* Conditional thirdparty includes
Single-header libraries like this require passing a bunch of defines _once_
before including the header, but not multiple times. This can make it tricky
in user code to know when to request the implementation, if the header needs
to be included in multiple files.
So properly compiling a .cpp file for the implementation solves this, and
also enables us to properly disable warnings on thirdparty implementation code.
This PR does a small refactor of how method flags are handled in the GDScript analyzer.
This way, it adds support for the analyzer to use any of MethodInfo's flags, where previously
it could only use METHOD_FLAG_STATIC and METHOD_FLAG_VARARG.
As a side-effect, this also normalizes behavior between editor and release templates, which fixes#76938.
The tests added also brought a different issue to light, where using `super()` appears to generate a
return variable discarded on calling super's _init(), which doesn't have a return value. This should be
tackled in a different PR, which will have to change the output of this PR's tests.