This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
This adds a static is_viable() method to all rasterizers which has to be
called before initializing the rasterizer. This allows us to check what
rasterizer to use in OS::initialize together with the GL context
initialization.
This commit also adds a new project setting
"rendering/quality/driver/driver_fallback" which allows the creator of a
project to specify whether or not fallback to GLES2 is allowed. This
setting is ignored for the editor so the editor will always open even if
the project itself cannot run. This will hopefully reduce confusion for
users downloading projects from the internet.
We also no longer crash when GLES3 is not functioning on a platform.
This fixes#15324
-Project/Editor settings now show tooltips properly
-Settings thar require restart now will show a restart warning
-Video driver is now visible all the time, can be changed easily
-Added function to request current video driver
Now generating mouse events from touch is optional (on by default) and it's performed by `InputDefault` instead of having each OS abstraction doing it. (*)
The translation algorithm waits for a touch index to be pressed and tracks it translating its events to mouse events until it is raised, while ignoring other pointers.
Furthermore, to avoid an stuck "touch mouse", since not all platforms may report touches raised when the window is unfocused, it checks if touches are still down by the time it's focused again and if so it resets the state of the emulated mouse.
*: In the case of Windows, since it already provides touch-to-mouse translation by itself, "echo" mouse events are filtered out to have it working like the rest.
On X11 a little hack has been needed to avoid a case of a spurious mouse motion event that is generated during touch interaction.
Plus: Improve/fix tracking of current mouse position.
** Summary of changes to settings: **
- `display/window/handheld/emulate_touchscreen` becomes `input/pointing_devices/emulate_touch_from_mouse`
- New setting: `input/pointing_devices/emulate_mouse_from_touch`
Whether to use WebGL 1.0 or 2.0 can only be determined at runtime after
reading project settings, so check for the lower version.
The test is now in the HTML file, so if desired WebGL 2.0 can be
checked early by changing the behaviour there.
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
Rename engine.start() to startGame(), new start() takes string arguments
handed directly to main(). Rename Engine.loadEngine() to load().
Add setLocale(), setResizeCanvasOnStart(), setExecutableName() and
preloadFile().
This makes the interfaces available, without implementation, in other
platforms and the editor, which facilitates documenting platform-exclusive
classes.
Platform-exclusive APIs must be set up in platform/<platform>/api/api.cpp.
Provide noop method-implementations where necessary.
Also setup and document the HTML5 platform's JavaScript singleton.