summaryrefslogtreecommitdiff
path: root/platform/haiku
AgeCommit message (Collapse)Author
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-26Refactored input, goes all via windows now.Juan Linietsky
Also renamed Input to InputFilter because all it does is filter events.
2020-03-26Refactored Input, create DisplayServer and DisplayServerX11Juan Linietsky
2020-03-01Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodesRémi Verschelde
Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
2020-02-26Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez
Main: - It's now implemented thanks to `<mutex>`. No more platform-specific implementations. - `BinaryMutex` (non-recursive) is added, as an alternative for special cases. - Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes. - Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts. - A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this. - `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`. - Thread-safe utilities are therefore simpler now. Misc.: - `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same. - Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock). - `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.
2020-02-25Rename `scancode` to `keycode`.bruvzg
Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap. Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
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-02-13Remove obsolete GLES3 backendRémi Verschelde
Due to the port to Vulkan and complete redesign of the rendering backend, the `drivers/gles3` code is no longer usable in this state and is not planned to be ported to the new architecture. The GLES2 backend is kept (while still disabled and non-working) as it will eventually be ported to serve as the low-end renderer for Godot 4.0. Some GLES3 features might be selectively ported to the updated GLES2 backend if there's a need for them, and extensions we can use for that. So long, OpenGL driver bugs!
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-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-15Adding a new Camera Server implementation to Godot.BastiaanOlij
This is a new singleton where camera sources such as webcams or cameras on a mobile phone can register themselves with the Server. Other parts of Godot can interact with this to obtain images from the camera as textures. This work includes additions to the Visual Server to use this functionality to present the camera image in the background. This is specifically targetted at AR applications.
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 ContextGL since as an abstraction it's unused.Sebastian Hartte
2019-04-06Use mix rate and output latency constants in audio driversRémi Verschelde
Fix default mix rate in Xaudio2 and potential shadowing issue in JAndroid.
2019-02-26-Remove harcoded opengl extension testing from OS, ask rasterizer instead.Juan Linietsky
-Fixed a bug where etc textures were imported broken
2019-01-09Don't use -ffast-math or other unsafe math optimizationsHein-Pieter van Braam
Godot supports many different compilers and for production releases we have to support 3 currently: GCC8, Clang6, and MSVC2017. These compilers all do slightly different things with -ffast-math and it is causing issues now. See #24841, #24540, #10758, #10070. And probably other complaints about physics differences between release and release_debug builds. I've done some performance comparisons on Linux x86_64. All tests are ran 20 times. Bunnymark: (higher is better) (bunnies) min max stdev average fast-math 7332 7597 71 7432 this pr 7379 7779 108 7621 (102%) FPBench (gdscript port http://fpbench.org/) (lower is better) (ms) fast-math 15441 16127 192 15764 this pr 15671 16855 326 16001 (99%) Float_add (adding floats in a tight loop) (lower is better) (sec) fast-math 5.49 5.78 0.07 5.65 this pr 5.65 5.90 0.06 5.76 (98%) Float_div (dividing floats in a tight loop) (lower is better) (sec) fast-math 11.70 12.36 0.18 11.99 this pr 11.92 12.32 0.12 12.12 (99%) Float_mul (multiplying floats in a tight loop) (lower is better) (sec) fast-math 11.72 12.17 0.12 11.93 this pr 12.01 12.62 0.17 12.26 (97%) I have also looked at FPS numbers for tps-demo, 3d platformer, 2d platformer, and sponza and could not find any measurable difference. I believe that given the issues and oft-reported (physics) glitches on release builds I believe that the couple of percent of tight-loop floating point performance regression is well worth it. This fixes #24540 and fixes #24841
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-11-01Fix init of VisualServerRasterRémi Verschelde
Contrarily to what #23434 assumed, this is not a memory leak, the VisualServerRaster instance is passed as a parameter to VisualServerWrapMT's constructor. Fixes #23437.
2018-11-01Fix initialization of visual server in all platformsGeorge Marques
Avoid leaking an extra instance when using threads. Also fix threaded loading issues on Android and iOS.
2018-10-06Remove redundant "== true" codeAaron Franke
If it can be compared to a boolean, it can be evaluated as one in-place.
2018-10-02Fix warnings on virtual methods [-Woverloaded-virtual] ↵Rémi Verschelde
[-Wdelete-non-virtual-dtor] Fixes the following Clang 7 warnings: ``` editor/editor_help.h:123:7: warning: 'EditorHelpIndex::popup' hides overloaded virtual function [-Woverloaded-virtual] editor/editor_help.h:95:7: warning: 'EditorHelpSearch::popup' hides overloaded virtual function [-Woverloaded-virtual] editor/editor_help.h:96:7: warning: 'EditorHelpSearch::popup' hides overloaded virtual function [-Woverloaded-virtual] editor/plugins/curve_editor_plugin.h:141:15: warning: 'CurvePreviewGenerator::generate' hides overloaded virtual function [-Woverloaded-virtual] editor/plugins/script_editor_plugin.h:70:7: warning: 'ScriptEditorQuickOpen::popup' hides overloaded virtual function [-Woverloaded-virtual] editor/quick_open.h:69:7: warning: 'EditorQuickOpen::popup' hides overloaded virtual function [-Woverloaded-virtual] main/tests/test_io.cpp:53:15: warning: 'TestIO::TestMainLoop::input_event' hides overloaded virtual function [-Woverloaded-virtual] servers/audio/effects/audio_effect_record.h:69:15: warning: 'AudioEffectRecordInstance::process_silence' hides overloaded virtual function [-Woverloaded-virtual] core/os/memory.h:119:2: warning: destructor called on non-final 'ContextGL_X11' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor] core/os/memory.h:119:2: warning: destructor called on non-final 'EditorScriptCodeCompletionCache' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor] core/os/memory.h:119:2: warning: destructor called on non-final 'Engine' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor] core/os/memory.h:119:2: warning: destructor called on non-final 'PhysicalBone::JointData' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor] core/os/memory.h:119:2: warning: destructor called on non-final 'VisualServerScene' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor] core/os/memory.h:119:2: warning: destructor called on non-final 'VisualServerViewport' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor] ```
2018-10-01SCons: Remove avoidable defines from main env's CPPPATHRémi Verschelde
Also finally move freetype to its own env and disable warnings for it. Still needs some work to fix the awkward situation of the freetype and svg modules used in scene/ and editor/ respectively.
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
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.
2018-08-11Rebase patches for fixing haiku build.Adrien Destugues
2018-07-20Fix some more build issues after c69de2ba4Rémi Verschelde
Fixes #20301.
2018-07-19-Project/Editor settings now use new inspectorJuan Linietsky
-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
2018-06-28Optimize images losslessly using `oxipng -o6 --strip all --zopfli`Hugo Locurcio
2018-06-07Tweak some help texts in the build systemHugo Locurcio
This also removes `unix_global_settings_path` from SConstruct since it is no longer used.
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
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.
2018-01-04Fix macOS and other builds after #15299Duy-Nguyen TA
Commit ammended by @akien-mga to fix more platforms.
2018-01-04Change OS::initialize signature to return Error (fix segfault on x11)Emmanuel Leblond
2018-01-03Merge pull request #12814 from guilhermefelipecgs/add_hardware_custom_cursorRémi Verschelde
Custom hardware-accelerated mouse cursor
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-12-17Add implementation for custom hardware cursorGuilherme Silva
2017-12-09Fixes vsync setting ignored when using a separate thread for renderingStefano Bonicatti
Setting the vsync in the main thread, after the rendering thread starts and takes the OpenGL context fails, so we need to do that before. Also, for some reason, the main thread cannot make current the context anymore. Fixes #13447
2017-12-07Style: Apply new clang-format 5.0 style to all filesRémi Verschelde
2017-12-07Style: Apply clang-format again on all filesRémi Verschelde
Fixes issues introduced by newer clang-format versions or commits pushed directly without using the clang-format pre-commit hook.
2017-11-28disable caching for targets using helper functionsRhody Lugo
2017-11-20Merge pull request #12988 from akien-mga/xdg-home-pathsRémi Verschelde
Add support for XDG Base Directory spec
2017-11-19Add initial support for the XDG Base Directory specRémi Verschelde
Spec version 0.7 from https://standards.freedesktop.org/basedir-spec/basedir-spec-0.7.html (latest as of this commit). Three virtual methods are added to OS for the various XDG paths we will use: - OS::get_data_path gives XDG_DATA_HOME, or if missing: ~/.local/share on X11, ~/Library/Application Support/ on macOS and %APPDATA% on Windows - OS::get_config_path gives XDG_CONFIG_HOME, or if missing: ~/.config on X11, ~/Library/Application Support/ on macOS and %APPDATA% on Windows - OS::get_cache_path gives XDG_CACHE_HOME, or if missing: ~/.cache on X11, ~/Library/Caches on macOS and %APPDATA% on Windows So for Windows there are no changes, for Linux we follow the full split spec and for macOS stuff will move from ~/.godot to ~/Library/Application Support/Godot. Support for system-wide installation of templates on Unix was removed for now, as it's a bit hackish and I don't think anyone uses it. user:// will still be OS::get_data_path() + "/godot/app_userdata/$name" by default, but when using the application/config/use_shared_user_dir option it will now use XDG_DATA_HOME/$name, e.g. ~/.local/share/MyGame. For now everything still goes in EditorSettings::get_settings_dir(), but this will be changed in a later commit to make use of the new splitting where relevant. Part of #3513.
2017-11-19Cleanup old references to GLES2 rendererRémi Verschelde
There are still some left in the Android Java code, even stuff to swap between GLES1 and GLES2 support from early Godot days... would be good to see some cleanup there too one day. The "graphics/api" option for Android exports is removed, as only GLES 3.0 is supported. It can be readded when GLES 2.0 support comes back. Fixes #13004.
2017-11-09Make video mode initialization more intuitive, fixes #12022Juan Linietsky