summaryrefslogtreecommitdiff
path: root/platform/server
AgeCommit message (Collapse)Author
2021-02-22Use -latomic when using clang (server platform)Hein-Pieter van Braam-Stewart
version of c9b3a00a63fafa546bf402e32fd21ebe7f274b43 for the server platform
2021-02-08SCons: Fix debug_symbols tests after switch to BoolVariableRémi Verschelde
Bug introduced in #45679. Fixes part of #45816.
2021-02-03SCons: Add `production=yes` option to use production defaultsRémi Verschelde
This is meant for users making custom builds to match the options used on optimized, official builds. This enables, on the platforms which support them: - `use_static_cpp=yes` (portable binaries for Linux and Windows) - `use_lto=yes` (link time optimizations - note: requires a lot of RAM!) - `debug_symbols=no` (no debug symbols, smaller binaries) Also abort when using MSVC with `production=yes`, as: - It cannot optimize the GDScript VM like GCC or Clang do, leading to significant performance drops. - Its LTO support is unreliable, at least used to trigger crashes last we tried it extensively. All options can still be overridden if specified, and the `dev=yes` option was changed to also support overrides.
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-17Remove OS::can_draw() remnantsMarcel Admiraal
2020-12-16SCons: Add only selected platform's opts to envRémi Verschelde
Otherwise we can get situations where platform-specific opts with the same name can override each other depending on the order at which platforms are parsed, as was the case with `use_static_cpp` in Linux/Windows. Fixes #44304. This also has the added benefit that the `scons --help` output will now only include the options which are relevant for the selected (or detected) platform.
2020-12-09Cleanup unused engine codeTomasz Chabora
2020-12-08Merge pull request #43742 from qarmin/editor_modules_default_valuesRémi Verschelde
Initialize class/struct variables with default values in platform/ and editor/
2020-12-04RenderingServer reorganizationreduz
2020-12-03Reorganize rendering server.reduz
-Made RenderingServerScene abstract, allowing reimplementation -RenderingServerRaster -> RenderingServerDefault, but this class is going away soon.
2020-12-02Initialize class/struct variables with default values in platform/ and editor/Rafał Mikrut
2020-11-26[Complex Text Layouts] Add third-party TextServer dependencies (ICU, ↵bruvzg
HarfBuzz, Graphite).
2020-11-25SCons: Do not define TYPED_METHOD_BIND on Linux/clangRémi Verschelde
It's now only needed for MSVC.
2020-11-19SCons: Remove unnecessary $LINK overridesRémi Verschelde
As of SCons 4.0.1, the default value for $LINK is $SMARTLINK, which itself is a function that will use $CXX as linker for C++: https://github.com/SCons/scons/blob/4.0.1/SCons/Tool/link.py#L327-L328 https://github.com/SCons/scons/blob/4.0.1/SCons/Tool/link.py#L54-L76 So we don't need to manually specify the same value as $CXX for $LINK.
2020-11-09Remove `debug_symbols=full` in favor of `debug_symbols=yes`Hugo Locurcio
`debug_symbols=yes` will now behave like `debug_symbols=full` did before. The difference in compressed file sizes is not that large, which means there isn't much point in having two different values. This helps make the buildsystem easier to understand.
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-09-18Linux/BSD: Fix support for NetBSDRémi Verschelde
Add __NetBSD__ to `platform_config.h` so that it can find `alloca` and use the proper `pthread_setname_np` format. Rename RANDOM_MAX to avoid conflict with NetBSD stdlib. Fixes #42145.
2020-07-24t Add unit testing to Godot using DocTest and added to GitHub Actions CIRevoluPowered
Implements exit codes into the engine so tests can return their statuses. Ideally we don't do this, and we use FIXUP logic to 'begin' and 'end' the engine execution for tests specifically. Since realistically we're initialising the engine here we don't want to do that, since String should not require an engine startup to test a single header. This lowers the complexity of running the unit tests and even for physics should be possible to implement such a fix.
2020-07-23SCons: Remove unused DEBUG_MEMORY_ENABLED defineRémi Verschelde
Its last use was removed in Godot 3.0, so it no longer makes sense to define. Also removed `D3D_DEBUG_INFO` for Windows as it's likely a left over from a long time ago pre-opensourcing when Godot had some form of Direct3D 9 support?
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-04-28Rename InputFilter back to InputRémi Verschelde
It changed name as part of the DisplayServer and input refactoring in #37317, with the rationale that input no longer goes through the main loop, so the previous Input singleton now only does filtering. But the gains in consistency are quite limited in the renaming, and it breaks compatibility for all scripts and tutorials that access the Input singleton via the scripting language. A temporary option was suggested to keep the scripting singleton named `Input` even if its type is `InputFilter`, but that adds inconsistency and breaks C#. Fixes godotengine/godot-proposals#639. Fixes #37319. Fixes #37690.
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-30SCons: Format buildsystem files with psf/blackRémi Verschelde
Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
2020-03-27Renaming of servers for coherency.Juan Linietsky
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
2020-03-26Multiple changes to DisplayServerX11Mateo Kuruk Miccino
- Travis: Change x11 to linuxbsd - SCons: Change x11 plataform to linuxbsd - Plugins: Remove ; to avoid fallthrough warning - DisplayServerX11: Implement set_icon - DisplayServerX11: Fix X11 bug when a window was erased from windows map, all the changes from that erased windows are sending to the main window - DisplayServerX11: Reorder create_window commands - DisplayServerX11: Change every Size2 to Size2i and Rect2 to Rect2i where it belongs + More X11 fixes which have been integrated directly back into reduz's original commits while rebasing the branch.
2020-03-26Refactored input, goes all via windows now.Juan Linietsky
Also renamed Input to InputFilter because all it does is filter events.
2020-03-26Effective DisplayServer separation, rename X11 -> LinuxBSDJuan Linietsky
2020-03-26Refactored Input, create DisplayServer and DisplayServerX11Juan Linietsky
2020-03-06assimp: Clean and document buildsystem, prepare for unbundlingRémi Verschelde
- Improve the SCsub to allow unbundling and remove unnecessary code. - Move files around to match upstream source. - Re-sync with upstream commit 308db73d0b3c2d1870cd3e465eaa283692a4cf23 to ensure we don't have local modifications. - Doesn't actually build against current version 5.0.1 due to the lack of the new ArmaturePopulate API that Gordon authored. We'll have to wait for a public release with that API (5.1?) to enable unbundling.
2020-03-03Drop old semaphore implementationPedro J. Estébanez
- Removed platform-specific implementations. - Now all semaphores are in-object, unless they need to be conditionally created. - Similarly to `Mutex`, provided a dummy implementation for when `NO_THREADS` is defined. - Similarly to `Mutex`, methods are made `const` for easy use in such contexts. - Language bindings updated: `wait()` and `post()` are now `void`. - Language bindings updated: `try_wait()` added. Bonus: - Rewritten the `#ifdef` in `mutex.h` to meet the code style.
2020-02-26Added code coverate support to GodotRafał Mikrut
2020-02-20Remove unused driver/dummy/audio_driver_dummy.hTwarit
2020-02-14Remove incomplete battery status/power APIRémi Verschelde
It was initially implemented in #5871 for Godot 3.0, but never really completed or thoroughly tested for most platforms. It then stayed in limbo and nobody seems really keen to finish it, so it's better to remove it in 4.0, and re-add eventually (possibly with a different API) if there's demand and an implementation confirmed working on all platforms. Closes #8770.
2020-01-14Remove unused ip_unix member from OSX/server.Fabio Alessandrelli
2020-01-13Image: Include S3TC compression via Squish in non-tools buildRémi Verschelde
We already build Squish in templates build for S3TC decompression, so we can as well expose the compression feature. Fixes #25640.
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-12-01iOS modular build and export implementation.bruvzg
2019-08-12Remove redundant author doc commentsIAmActuallyCthulhu
2019-08-07Added Thread Sanitizerqarmin
2019-07-16CameraServer is needed for editor nodeCameron Reikes
- Editor asks ClassDB for docs - ClassDB asks CameraFeed for default parameters - In CameraFeed's constructor, polls CameraServer
2019-07-04Remove libwebsocket. No longer used, yay!Fabio Alessandrelli
2019-07-03SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor definesRémi Verschelde
It's the recommended way to set those, and is more portable (automatically prepends -D for GCC/Clang and /D for MSVC). We still use CPPFLAGS for some pre-processor flags which are not defines.
2019-06-19Png driver reworked to use libpng 1.6 simplified APIIbrahn Sahir
Wrapped libpng usage in a pair of functions under PNGDriverCommon, which convert between Godot Image and png data. Switched to libpng 1.6 simplified API for ease of maintenance. Implemented ImageLoaderPNG and ResourceSaverPNG in terms of PNGDriverCommon functions. Travis, switched to builtin libpng (thus builtin freetype and zlib also) so we can build on Xenial.
2019-06-11bullet: Sync with current upstream master branchRémi Verschelde
This updates our local copy to commit 5ec8339b6fc491e3f09a34a4516e82787f053fcc. We need a recent master commit for some new features that we use in Godot (see #25543 and #28909). To avoid warnings generated by Bullet headers included in our own module, we include those headers with -isystem on GCC and Clang. Fixes #29503.
2019-05-21added a const keyword for a methods that return constant literal...hbina085
2019-04-30SCons: Always use env.Prepend for CPPPATHRémi Verschelde
Include paths are processed from left to right, so we use Prepend to ensure that paths to bundled thirdparty files will have precedence over system paths (e.g. `/usr/include` should have lowest priority).
2019-04-24SCons: Review uses of CCFLAGS, CXXFLAGS and CPPFLAGSRémi Verschelde
Many contributors (me included) did not fully understand what CCFLAGS, CXXFLAGS and CPPFLAGS refer to exactly, and were thus not using them in the way they are intended to be. As per the SCons manual: https://www.scons.org/doc/HTML/scons-user/apa.html - CCFLAGS: General options that are passed to the C and C++ compilers. - CFLAGS: General options that are passed to the C compiler (C only; not C++). - CXXFLAGS: General options that are passed to the C++ compiler. By default, this includes the value of $CCFLAGS, so that setting $CCFLAGS affects both C and C++ compilation. - CPPFLAGS: User-specified C preprocessor options. These will be included in any command that uses the C preprocessor, including not just compilation of C and C++ source files [...], but also [...] Fortran [...] and [...] assembly language source file[s]. TL;DR: Compiler options go to CCFLAGS, unless they must be restricted to either C (CFLAGS) or C++ (CXXFLAGS). Preprocessor defines go to CPPFLAGS.
2019-04-15Add Input::get_current_cursor_shapeGuilherme Felipe
[Clean up] Removed unused/unnecessary methods.
2019-04-06Remove unused importsHendrikto