summaryrefslogtreecommitdiff
path: root/platform/osx
AgeCommit message (Collapse)Author
2020-04-29Merge pull request #37802 from ThakeeNathees/window-position-bug-osx-x11Rémi Verschelde
display server window position bug fix
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-26[macOS] Re-add define for build with 10.14 SDK, remove unsupported 10.12 checks.bruvzg
2020-04-11display server window position bug fix (#37323)Thakee Nathees
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-28Fixed missed occurrences in #37361 renamings.dankan1890
2020-03-26Prevent recursive `_dispatch_input_event` calls, improve focus regain on ↵bruvzg
window deletion.
2020-03-26Add macOS DisplayServer implementation.bruvzg
Change global menu to use Callable, add support for check items and submenus.
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-23Merge pull request #37219 from RajatGoswami/missing-include-guardsRémi Verschelde
Adding missing include guards to header files identified by LGTM
2020-03-23Adding missing include guards to header files identified by LGTM.Rajat Goswami
This addresses the issue godotengine/godot#37143
2020-03-21Make file formatting comply with POSIX and Unix standardsAaron Franke
UTF-8, LF, no BOM, and newlines at the end of files
2020-03-17Style: Set clang-format Standard to Cpp11Rémi Verschelde
For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-10Revert "Change LINKFLAGS to FRAMEWORKS which is supported since"Rémi Verschelde
This reverts commit c924e83a646f8a6d972ccd4d009acc323a6be158. SCons `FRAMEWORKS` is, according to their latest docs, only supported "On Mac OS X with gcc". While the "with gcc" part seems bogus, #36795 did introduce a link failure for our osxcross toolchain for compiling macOS binaries from Linux. SCons probably fails to detect this as a macOS target and does not use its `FRAMEWORKS` logic properly. So using `LINKFLAGS` as we used to is the more portable solution.
2020-03-06Replace IOHIDDeviceRegisterRemovalCallback with ↵bruvzg
IOHIDManagerRegisterDeviceRemovalCallback to fix gamepad disconnection callback on macOS Catalina.
2020-03-05Merge pull request #36752 from RandomShaper/rework_semaphoreRémi Verschelde
Drop old semaphore implementation
2020-03-04Change LINKFLAGS to FRAMEWORKS which is supported sincehungrymonkey
Scons release 0.96.91 Fixes the link errors below clang: error: no such file or directory: 'Carbon' clang: error: no such file or directory: 'AudioUnit' clang: error: no such file or directory: 'CoreAudio' clang: error: no such file or directory: 'CoreMIDI' clang: error: no such file or directory: 'IOKit' clang: error: no such file or directory: 'ForceFeedback' clang: error: no such file or directory: 'CoreVideo' clang: error: no such file or directory: 'AVFoundation' clang: error: no such file or directory: 'CoreMedia' clang: error: no such file or directory: 'Metal' clang: error: no such file or directory: 'QuartzCore' Tested on System Version: macOS 10.15.3 (19D76) SCons by Steven Knight et al.: script: v3.1.2.bee7caf9defd6e108fc2998a2520ddb36a967691, 2019-12-17 02:07:09, by bdeegan on octodog engine: v3.1.2.bee7caf9defd6e108fc2998a2520ddb36a967691, 2019-12-17 02:07:09, by bdeegan on octodog engine path: ['/usr/local/Cellar/scons/3.1.2_1/libexec/scons-local/SCons'] Xcode 11.3.1 Build version 11C504 Apple clang version 11.0.0 (clang-1100.0.33.17) Target: x86_64-apple-darwin19.3.0 Closes #36720
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-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-22Travis: Use Ubuntu 18.04 (bionic) as base imageRémi Verschelde
It's now available and allows us to have a better default environment, with GCC 7.4.0 and Clang 7. We now need GCC 7+ for C++17 support so it's more efficient to upgrade the image than to install it on Ubuntu 16.04 (xenial). Also fixes a couple -Wdeprecated-declarations warnings on macOS now that we build against macOS 10.12.
2020-02-22SCons: Bump required C++ standard to C++17Rémi Verschelde
As per #36436, we now need C++17's guaranteed copy elision feature to solve ambiguities in Variant. Core developers discussed the idea to move from C++14 to C++17 as our minimum required C++ standard, and all agreed. Note that this doesn't mean that Godot is going to be written in "modern C++", but we'll use modern features where they make sense to simplify our "C with classes" codebase. Apart from new code written recently, most of the codebase still has to be ported to use newer features where relevant. Proper support for C++17 means that we need recent compiler versions: - GCC 7+ - Clang 6+ - VS 2017 15.7+ Additionally, C++17's `std::shared_mutex` (conditionally used by `vk_mem_alloc.h` when C++17 support is enabled) is only available in macOS 10.12+, so we increase our minimum supported version.
2020-02-18PoolVector is gone, replaced by VectorJuan Linietsky
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
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-02-11Vulkan: Move thirdparty code out of drivers, style fixesRémi Verschelde
- `vk_enum_string_helper.h` is a generated file taken from the SDK (Vulkan-ValidationLayers). - `vk_mem_alloc.h` is a library from GPUOpen: https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
2020-02-11Restore parts of #33783 and #32809 missing after rebase.bruvzg
2020-02-11Fix code formatting issues and VS compilationRémi Verschelde
Also temporarily disable multicheck build so that we get a full build even when there are style issues on Vulkan. Fixes #33356.
2020-02-11Merge pull request #32821 from bruvzg/vlk_fix_macos_exitRémi Verschelde
[Vulkan, macOS] Fix RID leaks and crashes on exit.
2020-02-11Move Vulkan context/rendering_device destruction to windowWillClose ↵bruvzg
notification.
2020-02-11Improve HiDPI handling, fix incorrect window viewport clipping.bruvzg
2020-02-11SCons: Streamline Vulkan buildsystem + fixupsRémi Verschelde
- Renamed option to `builtin_vulkan`, since that's the name of the library and if we were to add new components, we'd likely use that same option. - Merge `vulkan_loader/SCsub` in `vulkan/SCsub`. - Accordingly, don't use built-in Vulkan headers when not building against the built-in loader library. - Drop Vulkan registry which we don't appear to need currently. - Style and permission fixes.
2020-02-11Merge pull request #29993 from bruvzg/vulkanRémi Verschelde
Initial Vulkan support for macOS (MoltenVK) and Windows
2020-02-11Add runtime GLES2 / Vulkan context selection.bruvzg
2020-02-11Add static Vulkan loader.bruvzg
Initial Vulkan support for Windows. Initial Vulkan support for macOS.
2020-02-11Added a spinlock template as well as a thread work pool class.Juan Linietsky
Also, optimized shader compilation to happen on threads.
2020-02-11Custom material support seems complete.Juan Linietsky
2020-02-11Texture refactorJuan Linietsky
-Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
2020-02-10Merge pull request #35301 from Calinou/improve-console-error-loggingRémi Verschelde
Improve the console error logging appearance
2020-02-05Remove duplicate ERR_PRINT macro.Marcel Admiraal
2020-01-31Merge pull request #35684 from timothyqiu/macos-sanitizersRémi Verschelde
Adds sanitizer options for macOS
2020-01-31Adds extra cursors for macOSHaoyu Qiu
Before, plain arrow cursor or unsuitable ones were used.
2020-01-29Adds sanitizer options for macOSHaoyu Qiu
2020-01-19Improve the console error logging appearanceHugo Locurcio
This makes secondary information less visually prominent to improve overall readability. Various loggers were also tweaked for consistency.
2020-01-14Remove unused ip_unix member from OSX/server.Fabio Alessandrelli
2020-01-14Fixes IME input backspace on macOSHaoyu Qiu
2020-01-10[macOS/Mono] Filter release/debug and rename Mono data folder on export.bruvzg
2020-01-10[macOS] Load PCK from the .app bundle resources, instead of changing working ↵bruvzg
directory.
2020-01-10macOS DMG export: create folder structure for the files extracted from ↵bruvzg
export template ZIP.