summaryrefslogtreecommitdiff
path: root/main/main.cpp
AgeCommit message (Collapse)Author
2021-08-23Merge pull request #51947 from AnilBK/redundant-assignmentsMichael Alexsander
[cppcheck] Remove some redundant assignments.
2021-08-22Merge pull request #37260 from Calinou/define-minimum-window-sizeHugo Locurcio
Define a default minimum window size to workaround rendering issues
2021-08-22Merge pull request #36872 from Calinou/default-stretch-aspect-expandHugo Locurcio
Use the `keep` stretch aspect by default
2021-08-22Define a default minimum window size to workaround rendering issuesHugo Locurcio
The minimum window size can still be set to `Vector2(0, 0)` in a script if needed. This closes #37242.
2021-08-21Remove redundant assignments.Anilforextra
Use used_in_transfer instead of used_in_compute twice.
2021-08-13Add project setting for agile input event flushingPedro J. Estébanez
If enabled, key/touch/joystick events will be flushed just before every idle and physics frame. Enabling this can greatly improve the responsiveness to input, specially in devices that need to run multiple physics frames per each idle frame, because of not being powerful enough to run at the target frame rate. This will only work for platforms using input buffering (regardless event accumulation). Currenly, only Android does so, but could be implemented for iOS in an upcoming PR.
2021-08-13Add input buffering frameworkPedro J. Estébanez
Input buffering is implicitly used by event accumulation, but this commit makes it more generic so it can be enabled for other uses. For desktop OSs it's currently not feasible given main and UI threads are the same).
2021-08-11Merge pull request #51486 from reduz/fixes-to-mobile-rendererRémi Verschelde
Fixes and optimizations to mobile renderer
2021-08-10Fixes and optimizations to mobile rendererreduz
* Only apply final actions to attachments used in the last pass. * Fixes to draw list final action (was using continue instead of read/drop). * Profiling regions inside draw lists now properly throw errors. * Ability to enable gpu profile printing from project settings. (used to debug).
2021-08-11Rename `iterations_per_second` to `physics_ticks_per_second`Hugo Locurcio
This makes it clearer that this property is only about physics FPS, not rendering FPS. The `physics_fps` project setting was also renamed to `physics_ticks_per_second` for consistency.
2021-08-03[Headless] Add --headless switch (no rendering, no audio).Fabio Alessandrelli
Also remove now unused "--no-window" option, and relative OS getter and setter.
2021-07-31Print a warning when the engine is started as `root`/superuserHugo Locurcio
This is a security risk (especially when hosting a game server) and can make audio non-functional on Linux.
2021-07-24Merge pull request #50786 from reduz/implement-resource-uidsRémi Verschelde
Implement Resource UIDs
2021-07-24Implement Resource UIDsreduz
* Most resource types now have unique identifiers. * Applies to text, binary and imported resources. * File formats reference both by text and UID (when available). UID always has priority. * Resource UIDs are 64 bits for better compatibility with the engine. * Can be represented and used textually, example `uuid://dapwmgsmnl28u`. * A special binary cache file is used and exported, containing the mappings. Example of how it looks: ```GDScript [gd_scene load_steps=2 format=3 uid="uid://dw86wq31afig2"] [ext_resource type="PackedScene" uid="uid://bt36ojelx8q6c" path="res://subscene.scn" id="1_t56hs"] ``` GDScript, shaders and other special resource files can't currently provide UIDs, but this should be doable with special keywords on the files. This will be reserved for future PRs.
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-22Move `alert` function from `DisplayServer` to `OS`.bruvzg
2021-07-20Adds ability to debug stringnamesreduz
* References (which include hash tables) can be profiled with --debug-stringnames
2021-07-13Implement the ability to disable classesreduz
* This PR adds the ability to disable classes when building. * For now it's only possible to do this via command like: `scons disable_classes=RayCast2D,Area3D` * Eventually, a proper UI will be implemented to create a build config file to do this at large scale, as well as detect what is used in the project.
2021-07-12Change VSync mode project setting enum type from string to integerHendrik Brucker
2021-07-06Restructure and reimplement vsync optionsHendrik Brucker
-Add a v-sync mode setting which allows to choose between DISABLED, ON, ADAPTIVE and MAILBOX -Removed the V-Sync via Compositor option
2021-06-25Implement native extension systemreduz
* Deprecates GDNative in favor of a simpler, lower level interface. * New extension system allows registering core engine classes. * Simple header interface in gdnative_interace.h
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-19Use the `keep` stretch aspect by defaultHugo Locurcio
This makes Godot avoid distortion when resizing the window to an aspect ratio that doesn't match the project's base aspect ratio. Since this setting has no effect when the stretch mode is `disabled` (the default), this won't impact projects not using the `canvas_items` or `viewport` stretch modes.
2021-06-16Main: Fixup bogus fallback to project manager with more bologneseRémi Verschelde
WARNING: Hacks everywhere! The logic in `main.cpp` is due a full rewrite as it's extremely hacky, splitting argument parsing over several functions, with a mess of global state and assumptions about what combinations of arguments or lack thereof should mean in terms of what we want to read: game, editor, project manager, or command line tools such as `--doctool`, `--export` or `--script`. Until this is fully rewritten, this patch hacks things some more to ensure that we don't fall back to the project manager in cases where it's not warranted, and especially not *too late*, as it can mean that we haven't properly initialized stuff like `EditorPaths` needed by the PM (which in turn impacts what kind of path will be used for logs and the shader cache, etc... the rabbit hole goes deep). Fixes #41435. Fixes #49392. Fixes #49658. Fixes https://github.com/godotengine/godot/issues/38202#issuecomment-773158477.
2021-06-15Merge pull request #49432 from Calinou/tweak-physics-fps-property-hintRémi Verschelde
Tweak the physics FPS property hint to only allow reasonable values
2021-06-14Refactor editor paths validation in EditorPaths and EditorSettingsRémi Verschelde
- EditorSettings: Ensure that `create()` makes a valid singleton. Fixes #49179, fixes #49450. - EditorPaths: Cleanup code, properly set `paths_valid`. - EditorPaths: Move more paths validation (check, mkdir) from EditorSettings for a better separation of concerns. - EditorPaths: Move EditorFileSystem creation of `.godot/imported` next to other paths.
2021-06-12Merge pull request #49123 from aaronfranke/it-is-timeRémi Verschelde
Add a Time singleton
2021-06-11Add Time singletonAaron Franke
2021-06-11Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde
File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
2021-06-08Tweak the physics FPS property hint to only allow reasonable valuesHugo Locurcio
Physics FPS above 1000 cause the whole project to slow down and are not very practical in the first place (since no CPU currently available can keep up).
2021-05-31Implement shader cachingreduz
* Shader compilation is now cached. Subsequent loads take less than a millisecond. * Improved game, editor and project manager startup time. * Editor uses .godot/shader_cache to store shaders. * Game uses user://shader_cache * Project manager uses $config_dir/shader_cache * Options to tweak shader caching in project settings. * Editor path configuration moved from EditorSettings to new class, EditorPaths, so it can be available early on (before shaders are compiled). * Reworked ShaderCompilerRD to ensure deterministic shader code creation (else shader may change and cache will be invalidated). * Added shader compression with SMOLV: https://github.com/aras-p/smol-v
2021-05-24Use an enum to represent screen orientation in the Project SettingsHugo Locurcio
- Tweak the setting property hint to be more informative. - Make the setting a "basic" setting so it appears when Advanced Settings is disabled. - Remove redundant orientation setting in the iOS export preset. The project setting is now used (like on Android). Projects upgrading from a previous version will have to set the screen orientation again in the Project Settings if it wasn't set to the default value ("landscape").
2021-05-06Tweak CanvasItem/material sampling property hints for readabilityHugo Locurcio
The "Anisotropic" term is abbreviated as spelling it out would cause the PopupMenu to overflow the editor window when using the default inspector width.
2021-04-22ICU: Update to version 69.1, improve ICU data export process.bruvzg
2021-04-16Merge pull request #47701 from vnen/gdscript-test-runnerRémi Verschelde
2021-04-10Add option modules_enabled_by_defaulttotlmstr
2021-04-09Improve command line `--print-fps` displayHugo Locurcio
- Display the frame time in addition to FPS. - Frame time is a more objective measurement in comparison to FPS, but FPS is more familiar to people less acquainted with profiling. - Rename "Game" to "Project" for the project FPS printing line.
2021-04-08Set up PackedData when setting up testsGeorge Marques
Some tests need functions of ProjectSettings that rely on this being available.
2021-04-06Main: Default `--doctool` path to '.' if none givenRémi Verschelde
2021-03-22Fix feature tag casing in the Windows pen tablet project setting nameHugo Locurcio
Feature tags are case-sensitive.
2021-03-17Tweak the editor splash screen color to better match the default themeHugo Locurcio
This helps achieve a visually "smoother" transition between the splash screen and the editor.
2021-03-12Fixes small typos and grammar correctionAnshul7sp1
2021-03-05Move cursor shape loading after module loadingJohannes
fixes #46685
2021-02-28Logger: Cache 'flush_stdout_on_print' to improve performance, and works ↵Mateo Kuruk Miccino
before ProjectSettings starts. ProjectSetting: Now 'application/run/flush_stdout_on_print' requires a restart of the Editor to take effect
2021-02-25Remove GDScript bindings for OS.get/set_exit_code, ↵Emmanuel Leblond
SceneTree.quit(<exit_code>) should be used instead
2021-02-22Merge pull request #46307 from RandomShaper/fix_crash_mono_glueRémi Verschelde
Make glue generation shutdown more graceful
2021-02-22Merge pull request #46313 from goostengine/tests-init-translation-serverRémi Verschelde
Initialize `TranslationServer` in the test environment
2021-02-22Initialize `TranslationServer` in the test environmentAndrii Doroshenko (Xrayez)
2021-02-22Make glue generation shutdown more gracefulPedro J. Estébanez
2021-02-18Merge pull request #46131 from bruvzg/move_tablet_to_dsRémi Verschelde
Move tablet driver API from OS to DisplayServer