Commit graph

143 commits

Author SHA1 Message Date
Rémi Verschelde
ba713c80df
Fix various typos with codespell
Using 2.2.7.dev51+geb4a58fe.
2023-11-11 23:01:24 +01:00
Adam Scott
230cebb4b7
Revert to proxy_to_pthread=no as default
Currently, `proxy_to_pthread=yes` option as default breaks WebXR
support.
2023-10-23 08:45:45 -04:00
Fabio Alessandrelli
e9df955e39 [Web] Fix closure compiler builds using BIGINT
When using proxy_to_pthread we add BIGINT support (to support exchanging
64 bits integers between wasm and JS).

Bigint though, is part of ECMAScript 2020, and the closure compiler was
using ECMAScript 6 instead.

This commit update the CC configuration to use ECMAScript 2020 instead.
2023-10-21 14:02:22 +02:00
Fabio Alessandrelli
bb69f0c090 [Web] Improve emscripten "locateFile" glue.
Be more selective on what we rewrite, since in recent emscripten
versions loading dynamic libraries relies on it.
2023-10-11 21:21:34 +02:00
Rémi Verschelde
a28dab7e82
Merge pull request #79711 from adamscott/web-non-blocking-main-thread
Add `proxy_to_pthread` option to `platform=web`
2023-10-09 23:22:22 +02:00
Adam Scott
78c2a08fae
Add proxy_to_pthread option to platform=web
Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
2023-10-09 11:50:01 -04:00
Rémi Verschelde
a1d7c62df7
Merge pull request #83003 from AThousandShips/null_check_extra
Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
2023-10-09 15:37:14 +02:00
A Thousand Ships
f18aa00e85 Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-10-08 17:23:33 +02:00
Mario Liebisch
56a3cdc2f0
Web: Catch using GDExtensions in a non-dlink build
Previously this would simply fail with a cryptic
`me.rtenv.loadDynamicLibrary is not a function` error.
2023-10-06 18:02:53 +02:00
kobewi
09b30be86d Add vararg call() method to C++ Callable 2023-10-05 11:35:29 +02:00
Adam Scott
8447cbc16d
Fix godot_js_wrapper_create_cb regression 2023-10-03 12:52:20 -04:00
Rémi Verschelde
9b29efd772
Merge pull request #82633 from Faless/web/visibility_expose
[Web] Fix `dlink_enabled` build
2023-10-02 13:16:51 +02:00
Rémi Verschelde
5fe97c5844
Merge pull request #82441 from akien-mga/web-clarify-get_unique_id
Web: Clarify that `OS.get_unique_id` is not supported
2023-10-02 13:16:31 +02:00
Fabio Alessandrelli
0bbadd6883 [Web] Fix dlink_enabled build
After changing the default visibility to hidden to avoid generating
thousands of import/export symbols (browsers have a hard limit of 10k),
explicitly setting visibility for "boundary functions" (i.e. wasm
callbacks called by JS via pointer) is required to ensure the function
can be retrieved via pointer from the function table.
2023-10-01 19:44:46 +02:00
Danil Alexeev
aff767ef07
Fix expected argument count for Callable call errors 2023-09-29 20:00:10 +03:00
Rémi Verschelde
0a10f09ce4
Web: Clarify that OS.get_unique_id is not supported
Remove the base error message in `OS`, we no longer really error out this
way for not implemented methods. Instead, each platform should override them
to provide the context they want.

Fixes #82439.
2023-09-27 15:17:45 +02:00
Mario Liebisch
426e18fd37
Updated compiler version detection
This fixes multiple issues/inconsistencies around  `get_compiler_version()`:
* With no shell allocated, launching the compiler could fail even
  with proper paths being set.
* The return value was described as "an array of version numbers as ints",
  but the function actually returned a `Dictionary` (or `None`).
* Not all calls were properly handling a `None` return value in case of errors.
  On Windows this broke compiling for me since #81869 with default settings.
* Some calls defined inconsistent defaults/fallbacks (`0` or `-1`).
2023-09-25 21:17:20 +02:00
Rémi Verschelde
bafcd32f15
Merge pull request #81716 from akien-mga/web-disable-raycast-embree
Web: Disable raycast module by default (no occlusion culling)
2023-09-22 22:03:55 +02:00
bruvzg
1887a9df19
[macOS/Windows] Add optional ANGLE backed OpenGL renderer support. Add EGL_ANDROID_blob_cache caching.
Co-authored-by: Riteo <riteo@posteo.net>
2023-09-21 14:21:00 +03:00
Rémi Verschelde
50161808c2
Web: Fix version check for missing scalbnf LTO workaround
The check needs to happen after we set `env["CXX"]`.
Follow-up to #81340.
2023-09-18 16:32:20 +02:00
Rémi Verschelde
8c40edf8c0
Web: Disable raycast module by default (no occlusion culling)
This means no CPU occlusion culling (and not compiling Embree), unless
you compile custom export templates with `module_raycast_enabled=yes`.

This reduces the memory footprint significantly, and binary size.

Fixes #70621.

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2023-09-16 21:00:04 +02:00
A Thousand Ships
3565d1bf7e [Drivers,Platform] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-12 20:13:32 +02:00
Rémi Verschelde
2cd740fd7a
Merge pull request #81105 from SysError99/master-fix-js-mem-leak
Fix JavaScript callback memory leak issue
2023-09-07 16:32:06 +02:00
SysError99
6a90164a03 Fix JavaScript callback memory leak issue
Typo fix
2023-09-07 19:59:45 +07:00
Yuri Sizov
3c63dce3cd Merge pull request #80573 from KoBeWi/2k_lines_of_changes_created_at_2AM
Add EditorStringNames singleton
2023-09-06 14:49:02 +02:00
Rémi Verschelde
b064008c07
Web: Workaround Emscripten 3.1.42+ LTO regression
Fixes #80010.
2023-09-05 14:58:52 +02:00
kobewi
6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
Emmanouil Papadeas
c662491bd4
Fix JavaScriptBridge.eval() never returning PackedByteArray
It wrongly returned 20 on array buffers, which used to be the enumerator
value of Godot 3.x's type PoolByteArray, and now is the value of type Color,
while it should return 29 which is the enumerator value for PackedByteArray.
2023-08-28 11:37:55 +02:00
Hugo Locurcio
469c462b76
Add missing tutorials to documentation classes 2023-08-19 20:29:24 +02:00
Hugo Locurcio
6f1152bdbe
Add a --audio-output-latency command-line argument
This allows optimizing the audio output latency on higher-end CPUs,
especially in projects that do not expose a way to override this setting.
2023-08-17 14:45:17 +02:00
Rémi Verschelde
314cdf456b
Merge pull request #79578 from Faless/web/4.x_dlink_visibility
[Web] Use `fvisibility=hidden` for side module when dlink_enabled.
2023-08-17 11:21:47 +02:00
Aaron Franke
ada360affe
Add a button in the export dialog to fix missing texture formats 2023-08-17 02:56:42 -05:00
Rémi Verschelde
3907e53ff6
SCons: Disable C++ exception handling
Upon investigating the extremely slow MSVC build times in #80513, I noticed
that while Godot policy is to never use exceptions, we weren't enforcing it
with compiler flags, and thus still included exception handling code and
stack unwinding.

This is wasteful on multiple aspects:

- Binary size: Around 20% binary size reduction with exceptions disabled
  for both MSVC and GCC binaries.
- Compile time:
  * More than 50% build time reduction with MSVC.
  * 10% to 25% build time reduction with GCC + LTO.
- Performance: Possibly, needs to be benchmarked.

Since users may want to re-enable exceptions in their own thirdparty code
or the libraries they compile with Godot, this behavior can be toggled with
the `disable_exceptions` SCons option, which defaults to true.
2023-08-16 10:23:34 +02:00
Rémi Verschelde
faaf27f284
Fix various typos with codespell
Also includes typo fixes from #79993, #80068, #80276, and #80303.

Co-authored-by: betalars <contact@betalars.de>
Co-authored-by: spaceyjase <429978+spaceyjase@users.noreply.github.com>
Co-authored-by: Swarkin <102416174+Swarkin@users.noreply.github.com>
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-08-07 13:09:47 +02:00
Fabio Alessandrelli
61e7d47344 [Web] Update npm packages 2023-07-31 21:43:59 +02:00
Yuri Sizov
63411859db Merge pull request #79351 from Repiteo/dotnet-handle-warnings
C#: Fix MSVC dotnet builds failing if running `dev_mode`
2023-07-26 18:40:06 +02:00
Fabio Alessandrelli
f4713d235a [Web] Always return -1 as body length in HTTPClientWeb.
Body length cannot be reliably retrieved from the web.
Reading the "content-length" value will return a meaningless value when
the response is compressed, as reading will return uncompressed chunks
in any case, resulting in a mismatch between the detected body size and
the actual size returned by repeatedly calling read_response_body_chunk.

Additionally, while "content-length" is considered a safe CORS header,
"content-encoding" is not, so using the "content-encoding" to decide if
"content-length" is meaningful is not an option either.

We simply must accept the fact that browsers are awful when it comes to
networking APIs.
2023-07-24 08:57:02 +02:00
Thaddeus Crews
897334a366
Allow MSVC dev_mode builds to succeed with dotnet
• Added #else section to mono #ifdef checks in relevant export_plugin scripts
2023-07-17 11:35:38 -05:00
Fabio Alessandrelli
5eed870a6a [Web] Use fvisibility=hidden for side module when dlink_enabled.
This hugely reduces the number of exports, making it acceptable for
browsers.

Note that dlink + threads is still not working due to upstream issues
with the pthread emulation library.

Should hopefully be solved once emscripten move to native WASM threads.
2023-07-17 13:18:02 +02:00
Hendrik Brucker
7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
Yuri Sizov
1da09fd477 Merge pull request #79062 from MewPurPur/svg-optimizations
Optimize SVG icons and remove unused Transpose icon
2023-07-12 21:02:53 +02:00
Yuri Sizov
2b47f6715e Merge pull request #78437 from bruvzg/set_icon
Add error checks and harmonize behavior of the `set_icon` method.
2023-07-12 15:09:14 +02:00
Yuri Sizov
6960a1d0e8 Merge pull request #78248 from felaugmar/load-svg-adjustable-scale
Added `Image::load_svg_from_(buffer|string)`
2023-07-12 15:09:03 +02:00
Kamil Brzoskowski
3cd865dbe8
Fix formatting of dlopen error message on Windows
And harmonize the format for all platforms.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-07-09 23:39:45 +02:00
Rémi Verschelde
ce32fe974e
Merge pull request #79048 from sepTN/its-platform-not-plafrom
Fix a typo in the TLSOptions documentation
2023-07-08 18:21:28 +02:00
Septian
b88b6b4f48 fix typo on TLSOptions.xml and library_godot_display.js 2023-07-08 13:34:50 +07:00
MewPurPur
fe194f8db0 Optimize SVG icons and remove unused Transpose icon 2023-07-07 17:58:15 +03:00
Rémi Verschelde
81064cc239
Doctool: Remove version attribute from XML header
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
2023-07-06 10:08:21 +02:00
Rémi Verschelde
346f1ab86b
Bump version to 4.2-dev
Keep on waitin'
2023-07-05 22:07:03 +02:00
bruvzg
9c5a0c6c10
Add error checks and harmonize behavior of the set_icon method. 2023-07-03 13:48:28 +03:00