Commit Graph

64 Commits

Author SHA1 Message Date
79842beb9a Ported: Expose OS.read_string_from_stdin() to the scripting API
This can be used in scripts to read user input in a blocking manner.
This also removes the unused `block` argument, which is always `true`.
- Calinou
badcfa2523
2023-02-07 01:07:31 +01:00
30d7a3c5a7 Backported: GLES2 fix octahedral half float unpacking
The strides in _unpack_half_floats() were incorrectly calculated in the case where octahedral normals and tangents were in use.
- lawnjelly
c6a428b3d6
2023-02-07 01:01:48 +01:00
2cd4e4d828 Renamed Set to RBSet. 2023-01-15 19:42:08 +01:00
1b0aac6028 Renamed Map to RBMap. 2023-01-15 19:12:50 +01:00
91e598aa7b Ported: SCons: Cleanup DEBUG, _DEBUG and NDEBUG defines
- `_DEBUG` is MSVC specific so it didn't make much sense to define for
  Android and iOS builds.
- iOS was the only platform to define `DEBUG`. We don't use it anywhere
  outside thirdparty code, which we usually don't intend to debug, so it
  seems better to be consistent with other platforms.
- Consistently define `NDEBUG` to disable assert behavior in both `release`
  and `release_debug` targets. This used to be set for `release` for all
  platforms, and `release_debug` for Android and iOS only.
- Due to the above, I removed the only use we made of `assert()` in Godot
  code, which was only implemented for Unix anyway, should have been
  `DEV_ENABLED`, and is in PoolAllocator which we don't actually use.
- The denoise and recast modules keep defining `NDEBUG` even for the `debug`
  target as we don't want OIDN and Embree asserting all over the place.
- akien-mga
b0b759e6da
2022-12-22 17:42:54 +01:00
norrath-hero
e1081d3d33 Fix GLES 2 Spotlight Bug
Fixes https://github.com/godotengine/godot/issues/69759
Fixes https://github.com/godotengine/godot/issues/54343
Fixes https://github.com/godotengine/godot/issues/25526
2022-12-22 14:38:33 +01:00
827638bfe0 Revert "Take FXAA samples from half-pixel coordinates to improve quality"
This reverts commit 8f0e3af2a2.
2022-12-11 19:28:05 +01:00
Ibrahn Sahir
1aa0c81dc1 Fix MIDI input with ALSA.
Reworked the handling of ALSA RawMidi input to support:
- Running Status.
- RealTime Category messages arriving during other messages data.
- Multiple connected RawMidi interfaces.

(cherry picked from commit 81575174cbd99b4d1cedbe763d1df7cbc7e641c6)
2022-12-11 19:09:17 +01:00
nikitalita
90a8cad6ed Fix DirAccessWindows::make_dir() choking on ".."
`CreateDirectoryW()` chokes on absolute paths that contain `..`
example: "C:\\workspace\\..\\games\\assets"
Simplifying the path before creating the dir fixes this.

(cherry picked from commit 0d3d5ac76983de35b8c1dddd65a4c2f8be74d555)
2022-11-30 19:27:06 +01:00
clayjohn
8f0e3af2a2 Take FXAA samples from half-pixel coordinates to improve quality
(cherry picked from commit dbcc0fa2a60edb3f3e69b0b73e7c9c612872559e)
2022-11-30 19:09:24 +01:00
dzil123
298be38336 Fix shader compiler asan out of bounds 2022-11-30 14:34:44 +01:00
31491c78bc Add back missing line. 2022-09-17 00:23:56 +02:00
lawnjelly
19dc79114d Prevent drawing MultiMesh with zero instance count
Issuing a driver drawcall for MultiMesh with zero instances crashes some drivers.
2022-09-17 00:22:17 +02:00
lawnjelly
0dc54e449a Fix GLES directional shadow uninitialized data
Valgrind shows directional_shadow.fbo accessed when uninitialized in directional_shadow_create.
2022-09-16 23:33:38 +02:00
lawnjelly
a39a25694d Batching - fix uninitialized color read
Valgrind was showing a read from uninitialized memory. r_fill_state.curr_batch->color is unset (for performance reasons), so can contain random data.

This actually doesn't matter in practice, since logically this uninitialized state can only occur when change_batch is set, and the only side effect is that change_batch is set. Hence why no bugs occur in practice.

This PR prevents this read from uninitialized data. It is likely free in terms of performance after optimization, and keeps the Valgrind logs clearer, so why not.
2022-09-16 23:30:31 +02:00
bitsawer
fefc436645 Fix Windows list dir handle leak
(cherry picked from commit 40325006b6c08c32b3db9dfd901e54d44b9d4dc3)
2022-09-16 21:11:55 +02:00
e24cb96418 Fix compile. 2022-09-16 13:05:22 +02:00
Pedro J. Estébanez
9db0cca2d9 Make audio thread control flags safe 2022-09-16 12:57:59 +02:00
e4ae7f2ebc Renamed Environment to Environment3D, and WorldEnvironment to WorldEnvironment3D. 2022-08-29 17:21:40 +02:00
e2d42db711 Also renamed the files. 2022-08-19 21:24:36 +02:00
cffe742085 Renamed the VisualServer to RenderringServer like in Godot4, as I think it's a lot better name for it. I did not yet rename the files. 2022-08-19 20:50:20 +02:00
f1619cad4f Ported: Add hint_transparent to use a transparent black placeholder texture - Calinou
ab9a95f266
2022-08-19 02:57:42 +02:00
Fabio Alessandrelli
63fbffd4ee IP uses print_verbose when getaddrinfo fails.
Avoid spamming errors when network is disconnected.
Returned address will be invalid, so it can be checked by the user via
`ret.is_valid_ip_address`.

(cherry picked from commit 59eea34851ef3b71bd9df4258f589d2c9681f5a7)
2022-08-19 02:13:06 +02:00
9757c39f05 Moved a few more core classes. 2022-08-17 17:43:49 +02:00
686663d3e4 Moved around more classes in core. 2022-08-17 16:01:01 +02:00
04feb63860 Moved Engine and projectSettings. 2022-08-17 15:35:28 +02:00
220b2db443 Moved String and related classes under a string folder in core. 2022-08-17 14:19:55 +02:00
9555ee56b9 Moved Variant related classes under a variant folder in core. 2022-08-17 13:17:12 +02:00
388b88678e Moved container related classes in core under a new containers directory. 2022-08-17 12:53:49 +02:00
8c2e76840c Removed CameraMatrix, and switched to Projection. 2022-08-16 10:26:35 +02:00
220954cf08 Backported most of the improvements to String from Godot4. 2022-08-15 22:54:03 +02:00
5cd44e02d0 Backported the improvements to Transform from Godot4. 2022-08-14 20:35:11 +02:00
e4cad690a3 Renamed elements in Transform2D to columns. 2022-08-14 15:37:05 +02:00
d9e094ab9a Renamed elements in Basis to rows. 2022-08-13 19:07:59 +02:00
730bce8587 Renamed Quat to Quaternion for consistency with the other engine math classes. 2022-08-13 15:22:33 +02:00
2e628b7fa8 Ported: Fix skeleton 2D stale bounding rect
Adds special logic for handling skeleton bounding rect updates. Previously these were never being updated because the canvas item is never set to "rect_dirty".
-lawnjelly
18bb668a2e
2022-08-07 16:01:27 +02:00
bb323b5bee Fixed lights. 2022-07-31 01:32:43 +02:00
31136b3669 Ported: Document support limitations for OmniLight cubemap shadows in GLES2 - Calinou
b03ceaba2f
2022-07-29 22:11:41 +02:00
9d76074b58 Ported: Add full support for Android scoped storage.
This was done by refactoring directory and file access handling for the Android platform so that any general filesystem access type go through the Android layer.
This allows us to validate whether the access is unrestricted, or whether it falls under scoped storage and thus act appropriately.
- m4gr3d
24e3b3b88d
2022-07-29 19:24:07 +02:00
44fd82b0b2 Ported: SCons: Properly track codegen script dependency for generated GLES headers - akien-mga
772d071863
2022-07-29 16:44:33 +02:00
152f9728b0 Ported: [Windows, 3.x] Add support for handling network share paths. - bruvzg
11a7997a67
2022-07-28 19:33:43 +02:00
06036225f4 Ported: More low priority redraw request cases
Some more cases of textures etc causing continuous updates in vital updates only mode are fixed.
- lawnjelly
f8df04ed50
2022-07-28 19:15:06 +02:00
84a5cc0fca Fix typo. 2022-07-28 18:44:49 +02:00
3f432af82b Ported: Disable Alpha throughout Glow and FXAA code in order to avoid issues with transparent viewports. - clayjohn
f92141be13
2022-07-28 11:34:02 +02:00
42b0cd29ab Ported: Disable alpha in post process when using opaque framebuffer - clayjohn
9927515254
2022-07-28 11:11:23 +02:00
942c23af34 Pported: Disable writing to alpha with opaque framebuffer - clayjohn
027ec28126
2022-07-28 11:02:41 +02:00
b0894431a2 Ported: Fixed Bug where DoF incorrectly wrote to alpha channel amd bug with tonemap shaders. - clayjohn
3374bae953
2022-07-27 19:47:50 +02:00
b75b256d7f Ported: fix post procressing with transparent bg and keep alpha channel of the tonemap shader output. - Kinwailo
b1a50ad805
2022-07-27 18:11:54 +02:00
clayjohn
e01c60516b Unpack blend shape arrays when necessary
Blend shapes need to be unpacked if the vertex array is being unpacked
2022-07-27 15:08:25 +02:00
850a84584d ported: Add OS::is_process_running function.
Adds the is_process_running function to the native OS class and exposes it to script.
This is implemented on Windows and Unix platforms. A stub is provided for other platforms that do not support this function.
Documentation is updated to reflect new API function. - mdavisprog
53fb0440d3
I did change it a bit.
2022-07-27 14:46:53 +02:00