Commit graph

339 commits

Author SHA1 Message Date
Pedro J. Estébanez 9a3a2b03b8 Drop old semaphore implementation
- 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-03-03 13:20:42 +01:00
Rémi Verschelde e2b66cacf7
Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodes
Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
2020-03-01 23:00:42 +01:00
Rémi Verschelde a7e1df4b1d doc: Sync classref for Packed{Int,Float}{32,64}Array additions 2020-02-25 22:02:36 +01:00
bruvzg 1af06d3d46
Rename scancode to keycode.
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-25 12:30:33 +02:00
Sam Green f12c0d1e98 Stub out Vulkan context for iPhone 2020-02-21 22:01:13 -08:00
Sam Green 2ba72b3a65 Add use_static_mvk option 2020-02-21 22:00:34 -08:00
Sam Green f40ff128b5 Update detect.py 2020-02-21 21:42:34 -08:00
Sam Green e03e607230 Resolve iOS and GLES compilation failures 2020-02-21 21:01:34 -08:00
Sam Green 6e25a5448d Import the correct rasterizer based on build settings 2020-02-21 20:48:19 -08:00
Juan Linietsky 3205a92ad8 PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
2020-02-18 10:10:36 +01:00
Rémi Verschelde 3dea5fd631 Remove incomplete battery status/power API
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-14 13:43:32 +01:00
Rémi Verschelde 386968ea97 Remove obsolete GLES3 backend
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-13 10:36:44 +01:00
Juan Linietsky c613ead5fa Added a spinlock template as well as a thread work pool class.
Also, optimized shader compilation to happen on threads.
2020-02-11 11:53:29 +01:00
Juan Linietsky 0586e18449 Custom material support seems complete. 2020-02-11 11:53:29 +01:00
Juan Linietsky 3f335ce3d4 Texture refactor
-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-11 11:53:26 +01:00
Rémi Verschelde a832776262 Merge pull request #34140 from bruvzg/ios_auto_icons_and_loadscreens
[iOS] Option to automatically generate icons and launch screens
2020-02-10 11:27:47 +01:00
Marcel Admiraal 5af3b4ca27 Remove duplicate ERR_PRINT macro. 2020-02-05 11:13:24 +01:00
Bruno Lourenço a3bcdbeb78 Android virtual keyboard respecting LineEdit max length. 2020-01-23 01:52:49 +00:00
zxcvdev 9a90ea1425 Fix crash when closing app on iphone 2020-01-18 09:54:07 +01:00
Rémi Verschelde 5011afcb6a Export: Improve usability of command line interface
I'm barely scratching the surface of the changes needed to make the
--export command line interface easy to use, but this should already
improve things somewhat.

- Streamline `can_export()` templates check in all platforms, checking
  first for the presence of official templates, then of any defined
  custom template, and reporting on the absence of any.
  Shouldn't change the actual return value much which is still true if
  either release or debug is usable - we might want to change that
  eventually and better validate against the requested target.

- Fix discrepancy between platforms using `custom_package/debug` and
  `custom_template/debug` (resp. `release`).
  All now use `custom_template`, which will break compatibility for
  `export_presets.cfg` with earlier projects (but is easy to fix).

- Use `can_export()` when attempting a command line export and report
  the same errors that would be shown in the editor.

- Improve error reporting after a failed export attempt, handling
  missing template and invalid path more gracefully.

- Cleanup of unused stuff in EditorNode around the export workflow.

- Improve --export documentation in --help a bit.

Fixes #16949 (at least many of the misunderstandings listed there).
Fixes #18470.
2020-01-07 14:25:56 +01:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
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.
2020-01-01 11:16:22 +01:00
Jonas Bernemann 41c3c77e80 Change bundle name rules on iOS to match Apple's requirements
Changed the bundle identifier verification to match the official
verficiation.
https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleidentifier

This help developers to migrate existing games to godot without
constantly having to change the bundle identifier in the generated
XCode project.
2019-12-14 00:03:30 +01:00
Jonas Bernemann 4d61118f64 Add project setting to hide home indicator on iOS
On iOS devices without a physical home button iOS
shows a home indicator instead. This is often in the
way of the UI or the game.
Added a project setting to disable hidden home indicator.
The default value is to hide the home indicator
2019-12-13 11:00:18 +01:00
bruvzg 509064de0f
[iOS] Adds export options to automatically generate iOS icons and launch screens from the project icon and boot splash. 2019-12-06 12:30:52 +02:00
Rémi Verschelde 4a56b45f87 iOS: Disable armv7 as target arch by default
We no longer compile for armv7 and x86 in the official export templates,
as those architectures are no longer relevant for iOS.

If users really want to support armv7 (used on devices from before
September 2013, e.g. iPhone 5), they can still build their own templates
and toggle the option.

We might remove the option altogether in a later release to avoid the
confusion for users that might tick the checkbox without having compiled
their own templates.

Fixes #34135.
2019-12-06 09:16:42 +01:00
bruvzg ccf8778e86
[iOS] Add export options to control external access to user data. 2019-12-03 12:06:54 +02:00
bruvzg 2ef8c5fac5
iOS modular build and export implementation. 2019-12-01 21:57:18 +02:00
Rémi Verschelde ab3bccdb78 Fix typos with codespell
Using codespell 1.16.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-11-22 08:35:03 +01:00
Max 29bde8cd74 Fix crash on exit or resume on iOS 13
Fixes #7966.
2019-11-05 10:28:42 +01:00
Rémi Verschelde 86abf62e48
Merge pull request #32326 from starryalley/ios_get_model_name
ios: support get_model_name
2019-10-25 07:41:28 +02:00
bruvzg 7b64340eb0
Fix compilation warnings in macOS build, enable warnings=extra werror=yes for macOS CI. 2019-10-24 20:37:56 +03:00
Rémi Verschelde dec10dd776
Merge pull request #32051 from qarmin/some_error_explanation
Added some obvious errors explanations
2019-09-25 11:51:54 +02:00
qarmin 17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Mark Kuo bba9d9123c ios: support get_model_name 2019-09-25 12:35:45 +10:00
Rémi Verschelde 1ecdd5b5cc
Merge pull request #32194 from AlexRixhardson/fix-7945
Fixes crash described in issue 7945 (Duplicated [self drawView] in iphone gl_view)
2019-09-24 09:17:54 +02:00
qarmin 50be65bf43 Changed some code found by Clang Tidy and Coverity 2019-09-22 18:45:08 +02:00
AlexRixhardson 973a4fe50f Fix crash on iOS devices during rotate 2019-09-18 22:50:16 +02:00
fogine e0df9de0cb iOS>=11 platform - when handling gestures on screen edges, godot apps should have priority over OS
Solves an issue where iOS would steal InputEventTouch events when near
screen edges in order to handle system wide gestures.
Fixes #31503
2019-08-21 22:22:18 +02:00
volzhs 4061e5bb75 Support vibration for Android and iOS 2019-08-21 23:38:53 +09:00
Robin Hübner 6ab118c464 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", "modules/gdnative", "modules/gdscript" directories. 2019-08-09 11:13:24 +02:00
Rémi Verschelde 77724fde60 Fix type mismatch in iOS interface orientation checks
Not sure why this error popped up when I enabled C++11 on the codebase,
but I guess this should fix it.
2019-07-22 20:31:15 +02:00
qarmin 6cbaf7662f Changed some code showed in LGTM and Coverage 2019-07-20 08:09:57 +02:00
Bastiaan Olij 776dc93571 Add microphone privilege settings support back into export and add privilege exist check to camera server for iOS 2019-07-06 15:48:51 +10:00
Rémi Verschelde b0d41847ed SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor defines
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-07-03 09:59:04 +02:00
Rémi Verschelde d17eac735c
Merge pull request #29815 from NilsIrl/plus_file_1
Replace ` + "/" + ` with `String::file_add()`
2019-07-01 12:06:35 +02:00
BastiaanOlij d9cefb34c1 ARKit for Godot 3.2
This PR introduces support for ARKit to the iOS version of Godot.
ARKit is Apples Augmented Reality platform.
This PR brings in support for ARKit 1.0 and implements a few ARKit 2.0 features.
It requires iOS 11 to run but should not prevent Godot from running on older versions as long as ARKit remains unused.
2019-06-30 18:54:48 +10:00
Nicholas Thompson c48576f733 Allow '-' character in iOS reverse DNS identifiers dissallow underscores. 2019-06-25 11:46:43 +01:00
Nils ANDRÉ-CHANG d2833d4f4d Replace + "/" + with String::file_add() 2019-06-23 13:33:50 +01:00
Rémi Verschelde 24ee8c3566 Add script to fix style issues and copyright headers
This is only meant to check the validity of the whole codebase every
now and then, or to apply clang-format config changes when relevant.
2019-06-17 13:35:47 +02:00
BastiaanOlij 02ea99129e Adding a new Camera Server implementation to Godot.
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-06-15 21:30:32 +10:00