Commit graph

123 commits

Author SHA1 Message Date
Yuri Sizov fc3f40f37d Improve engine startup/shutdown benchmarks
- Add contexts to give a better sense of benchmarked areas.
- Add missing benchmarks and adjust some begin/end points.
- Clean up names.
- Improve Android's internal benchmarks in a similar manner.

Co-authored-by: Fredia Huya-Kouadio <fhuya@meta.com>
2023-12-08 12:53:04 +01:00
Mikael Hermansson f1a9d8b5a5 Moved face_index field in 3D RayResult to end of struct 2023-09-26 23:18:16 +02:00
Bastiaan Olij 4874b96033 Expose RenderingSceneBuffers through ClassDB 2023-07-26 23:48:30 +10:00
Mikael Hermansson be64ffd25d Fix extension bindings for motion collision/result structs 2023-03-09 17:31:56 +01:00
Josh Jones a0715b30f9 Rework const on NavigationServer methods
`const` is used on all methods, even when they cause modification of the server.  This reworks the methods of the server to only use `const` on method that don't change the state of the server.
2023-01-07 17:29:00 -08:00
Rémi Verschelde 163f6f5fe8
Merge pull request #68429 from KoBeWi/PropertySettings
Add PropertyInfo overload for GLOBAL_DEF
2023-01-06 22:59:29 +01:00
Rémi Verschelde d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
kobewi 7c6b659bd7 Add PropertyInfo overload for GLOBAL_DEF 2022-12-11 21:36:48 +01:00
Rémi Verschelde 9521849da6 Merge pull request #62429 from smix8/navigation_path_query_4.x
Add NavigationPathQuery objects and NavigationServer query_path()
2022-09-21 13:25:48 +02:00
smix8 63dcb9aa80 Add NavigationPathQuery
Adds NavigationPathQueryParameters objects that can be used with NavigationServer.query_path() to query a customized navigation path.
2022-09-20 22:20:11 +02:00
Ricardo Buring ff4e72a0bc PhysicsServer2D and PhysicsServer3D: make body_set_state_sync_callback take a Callable
Prefer Callable to a C-style callback. This is helpful for GDExtension.
2022-09-15 15:09:23 +02:00
Ricardo Buring 532e378cd9 Expose registration of physics servers to GDExtension
This exposes PhysicsServer2DManager and PhysicsServer3DManager.
2022-09-07 15:05:46 +02:00
Ricardo Buring d22ff48b3d Create GDExtension classes for PhysicsServer2D
This allows a 2D physics server created entirely from GDExtension.
Based on the structure of PhysicsServer3DExtension by reduz.
2022-09-04 12:04:08 +02:00
Hugo Locurcio aa177fc4db
Split MovieWriterPNGWAV into its own file
This makes its organization consistent with MovieWriterMJPEG.
2022-06-30 01:02:28 +02:00
reduz 5786516d4d Implement Running Godot as Movie Writer
* Allows running the game in "movie writer" mode.
* It ensures entirely stable framerate, so your run can be saved stable and with proper sound (which is impossible if your CPU/GPU can't sustain doing this in real-time).
* If disabling vsync, it can save movies faster than the game is run, but if you want to control the interaction it can get difficult.
* Implements a simple, default MJPEG writer.

This new features has two main use cases, which have high demand:
* Saving game videos in high quality and ensuring the frame rate is *completely* stable, always.
* Using Godot as a tool to make movies and animations (which is ideal if you want interaction, or creating them procedurally. No other software is as good for this).

**Note**: This feature **IS NOT** for capturing real-time footage. Use something like OBS, SimpleScreenRecorder or FRAPS to achieve that, as they do a much better job at intercepting the compositor than Godot can probably do using Vulkan or OpenGL natively. If your game runs near real-time when capturing, you can still use this feature but it will play no sound (sound will be saved directly).

Usage:

$ godot --write-movie movie.avi [scene_file.tscn]

Missing:

* Options for configuring video writing via GLOBAL_DEF
* UI Menu for launching with this mode from the editor.
* Add to list of command line options.
* Add a feature tag to override configurations when movie writing (fantastic for saving videos with highest quality settings).
2022-06-21 11:28:47 +02:00
reduz 54542ef3ec Change Server initialization order
* Registration of server classes happened after Display initialization.
* This made no sense in practice and avoided the registration of custom server drivers (like custom XR server, custom Rendering server, custom XR server).
* Initialization moved to _before_ Display.
2022-06-01 16:48:28 +02:00
reduz de0ca3b999 Refactor module initialization
* Changed to use the same stages as extensions.
* Makes the initialization more coherent, helping solve problems due to lack of stages.
* Makes it easier to port between module and extension.
* removed the DRIVER initialization level (no longer needed).
2022-05-04 17:34:51 +02:00
Aaron Franke 0ae00a07d6
Rename variable names for some singletons 2022-04-26 22:53:50 -05:00
bruvzg f19cd44346
Unify TextServer built-in module and GDExtension code. 2022-03-17 08:15:29 +02:00
bruvzg 6079e14396
Cleanup and fix native struct definitions. 2022-03-16 20:14:15 +02:00
reduz 8b547331be Create GDExtension clases for PhysicsServer3D
* Allows creating a GDExtension based 3D Physics Server (for Bullet, PhysX, etc. support)
* Some changes on native struct binding for PhysicsServer

This allows a 3D Physics server created entirely from GDExtension. Once it works, the idea is to port the 2D one to it.
2022-03-15 18:39:31 +01:00
reduz 6f51eca1e3 Discern between virtual and abstract class bindings
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract".
* Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions.
* Converted a large amount of classes from "abstract" to "virtual" where it makes sense.

Most classes that make sense have been converted. Missing:

* Physics servers
* VideoStream
* Script* classes.

which will go in a separate PR due to the complexity involved.
2022-03-10 12:28:11 +01:00
Rémi Verschelde d22ac13bc2
Merge pull request #57715 from Faless/debugger/4.x_core_includes_and_servers
[Debugger] Move most profilers to ServersDebugger, fix core includes.
2022-02-09 21:57:32 +01:00
Ellen Poe 41a158af56
Add AudioStreamRandomizer, replacing AudioStreamRandomPitch
Add additional randomization options.
2022-02-09 00:05:32 +01:00
Fabio Alessandrelli 87f4bbd668 [Debugger] Move most profilers to ServersDebugger.
Also splits bandwidth/rpc profiler (RPCProfiler is now in
SceneDebugger).
2022-02-06 17:36:48 +01:00
Hugo Locurcio 736ac25306
Rename the physics server run_on_thread project settings
`run_on_separate_thread` is more explicit.
2022-01-29 17:35:50 +01:00
Rémi Verschelde fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
PouleyKetchoupp acbd24ea84 Use parameter classes instead of arguments for all physics queries
Same as what is already done for shape queries, applied to point and ray
queries. Easier to document and more flexible to add more parameters.

Also expose intersect_point method to script in 3D.
Remove intersect_point_on_canvas in 2D, replaced with a parameter.
2021-11-04 11:44:39 -07:00
Rémi Verschelde 483df71120
Merge pull request #53980 from nekomatata/rename-godot-physics-classes 2021-10-19 08:24:02 +02:00
PouleyKetchoupp cc39dca9f7 Rename Godot Physics classes from *SW to Godot*
Also moved MT physics server wrappers to the main servers folder, since
they don't have to be implementation specific.
2021-10-18 17:01:10 -07:00
Bastiaan Olij 5d1ea92daf Rework XR positional trackers 2021-10-17 12:12:20 +11:00
PouleyKetchoupp 3ae5687d48 Script interface improvements for test body motion
-Physics servers test body motion use a class to hold parameters instead
of multiple arguments to make it more readable and flexible since there
are many options
-Improved documentation for test body motion and kinematic collision
-Removed read-only properties for body motion results (not handled in
scripts, so they should be get_ methods only instead)
2021-10-04 10:49:10 -07:00
bruvzg 27e9d07f11 Remove Scene dependency from the TextServer, use scalable hex box font instead of built-in bitmap one. 2021-10-03 00:22:10 +03:00
bruvzg 0c0b5c84b0 Implement TextServer GDExtension interface, remove TextServer GDNative interface. 2021-10-01 15:13:29 +03:00
Bastiaan Olij 86ff7f8550 Adding GDExtension support to XRInterface 2021-08-26 23:24:44 +10:00
reduz 44d62a9f4b Implement NativeExtension pointer arguments
* Allows calling into native extensions directly with a pointer
* Makes it easier to implement some APIs more efficiently
* Appears with a "*" in the documentation for the argument.
* Implementing the pointer handling is entirely up to the implementation, although the extension API provides some hint.
* AudioStream has been implemented as an example, allowing to create NativeExtension based AudioStreams.
2021-08-23 19:58:40 -03:00
reduz cf3f404d31 Implement Binary Shader Compilation
* Added an extra stage before compiling shader, which is generating a binary blob.
* On Vulkan, this allows caching the SPIRV reflection information, which is expensive to parse.
* On other (future) RenderingDevices, it allows caching converted binary data, such as DXIL or MSL.

This PR makes the shader cache include the reflection information, hence editor startup times are significantly improved.
I tested this well and it appears to work, and I added a lot of consistency checks, but because it includes writing and reading binary information, rare bugs may pop up, so be aware.
There was not much of a choice for storing the reflection information, given shaders can be a lot, take a lot of space and take time to parse.
2021-07-26 08:40:39 -03:00
reduz 5ad4f26659 Implement the ability to disable classes
* This PR adds the ability to disable classes when building.
* For now it's only possible to do this via command like:
  `scons disable_classes=RayCast2D,Area3D`
* Eventually, a proper UI will be implemented to create a build config file to do this at large scale, as well as detect what is used in the project.
2021-07-13 09:25:14 -03:00
reduz b2f6db7aa8
Implement Specialization Constants
* Added support to our local copy of SpirV Reflect (which does not support it).
* Pass them on render or compute pipeline creation.
* Not implemented in our shaders yet.
2021-07-11 23:16:09 +02:00
PouleyKetchoupp ccac36a6e2 Remove unused PhysicsShapeQueryResult3D & PhysicsShapeQueryResult2D 2021-07-05 11:16:11 -07:00
PouleyKetchoupp 62e577267f Expose body_test_motion in 3D physics server
Results are exposed through PhysicsTestMotionResult3D, the same way it's
done for 2D.

Also cleaned a few things in the 2D version.
2021-07-02 18:03:44 -07:00
reduz b1d15c51bc Implement native extension system
* Deprecates GDNative in favor of a simpler, lower level interface.
* New extension system allows registering core engine classes.
* Simple header interface in gdnative_interace.h
2021-06-25 17:32:45 -03:00
reduz bde6f5eed1 Implement Framebuffer Subpass support
* Required for better optimizing mobile platforms
* Will be used by the Vulkan mobile renderer.
2021-06-24 15:59:15 -03:00
reduz 64140eaf42 Reorganize Project Settings
-Advanced Settings toggle also hides advanced properties when disabled
-Simplified Advanced Bar (errors were just plain redundant)
-Reorganized rendering quality settings.
-Reorganized miscelaneous settings for clean up.
2021-02-18 11:23:34 -03:00
reduz 8b19ffd810 Make Servers truly Thread Safe
-Rendering server now uses a split RID allocate/initialize internally, this allows generating RIDs immediately but initialization to happen later on the proper thread (as rendering APIs generally requiere to call on the right thread).
-RenderingServerWrapMT is no more, multithreading is done in RenderingServerDefault.
-Some functions like texture or mesh creation, when renderer supports it, can register and return immediately (so no waiting for server API to flush, and saving staging and command buffer memory).
-3D physics server changed to be made multithread friendly.
-Added PhysicsServer3DWrapMT to use 3D physics server from multiple threads.
-Disablet Bullet (too much effort to make multithread friendly, this needs to be fixed eventually).
2021-02-10 13:21:46 -03:00
Lyuma d800329d16 Add AudioEffectCapture
AudioEffectCapture allows access to the microphone and other audio on an audio bus in real-time.

Co-Authored-By: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
2021-02-02 09:22:16 -08:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
reduz 2787ad65be RenderingServer reorganization 2020-12-04 18:39:46 -03:00
bruvzg 493da99269
[Complex Text Layouts] Implement TextServer interface. Implement Fallback TextServer. 2020-11-26 13:55:26 +02:00
reduz 127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00