Commit Graph

149 Commits

Author SHA1 Message Date
985e6178b4 Remove extraneous includes from texture.h. 2025-10-10 18:39:16 +02:00
3d1c9fd5de Move server files into their subfolders 2025-09-30 19:39:39 -07:00
610c98c1ce Add SVGTexturesupport to NinePatchRect, TextureProgressBar and StyleBoxTexture. 2025-08-04 08:57:30 +03:00
34b485d62b Remove empty constructors and destructors from scene/ 2025-05-06 14:46:54 +02:00
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
73d85f46c9 Remove unused headers in scene.
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-12-24 00:40:09 +08:00
c2af6bcb59 GDExtension: Mark virtual function as is_required in extension_api.json
Co-authored-by: Jovan Gerodetti <jovan.gerodetti@titannano.de>
2024-09-11 16:48:14 -05:00
7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
0a4a1bc4b8 Add a square fill mode to GradientTexture2D 2023-04-20 16:32:42 +02:00
f540148072 Add dedicated setter for ImageTextureLayered::_images to fix create_from_images being hidden from the C# bindings 2023-03-09 17:53:36 +01:00
1075931c64 Remove unexposed ProxyTexture, mark AnimatedTexture as deprecated
According to reduz:

> [AnimatedTexture] should be removed together with ProxyTexture, its just
> not efficient at all in Vulkan and causes invalidation of all descriptor
> sets depending on it
> it was needed mostly for animated tilemaps, but nowadays there is not a lot
> of reason for it

Marking AnimatedTexture as deprecated accordingly, until we reach consensus
for removing it completely.
2023-02-17 12:32:26 +01:00
74458b6e9b Add "dedicated server" export mode which can strip unneeded visual resources 2023-01-23 13:24:54 -06:00
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
646d59e713 Merge pull request #63271 from Chaosus/fix_texture_error
Fix error emitting when opening some textures in the inspector
2022-10-11 16:17:15 +02:00
3cae53ba70 Remove unused struct in GradientTexture1D 2022-09-21 19:05:03 +02:00
9c9c5f662f Rework AnimatedTexture's fps into speed_scale
`fps` has been turned into `speed_scale`. It now affects the scale of the entire animation. If `speed_scale` is a negative value, the animation is played in reverse.

`frame_n/delay_sec` has been renamed to `frame_n/duration` _(prefixes exist, making the previous name redundant)_.

Setters and getters, documentation updated, too.
2022-09-06 21:40:09 +02:00
0c4d578bdf Merge pull request #65194 from Mickeon/rename-one-shot 2022-09-06 18:32:48 +02:00
8949386382 Rename AnimatedTexture oneshot to one_shot
AnimatedTexture.`oneshot` -> `one_shot`

For consistency. Every other exposed `one_shot` is spaced out like this.
2022-09-01 15:38:06 +02:00
7adc8376ed Change Array arguments to TypedArray 2022-09-01 13:13:19 +02:00
1a24c9e14b Make _validate_property a multilevel method 2022-08-22 18:35:11 +03:00
92bdeb7eb5 Unexpose ProxyTexture 2022-08-19 03:01:47 +02:00
90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
457e78a0bc Fix error emitting when opening some textures in the inspector 2022-07-21 09:48:15 +03:00
84431bd782 Use integer types in Image and ImageTexture methods
- Image.blit_rect()
- Image.blit_rect_mask()
- Image.blend_rect()
- Image.blend_rect_mask()
- Image.fill_rect()
- Image.get_used_rect()
- Image.get_rect()
- ImageTexture.set_size_override()
2022-07-18 19:43:32 -05:00
d2900429e8 Add static methods for creating Image and ImageTexture 2022-07-08 13:40:47 +02:00
80025171cd Re-add internal image field to ImageTexture 2022-06-08 00:57:03 +02:00
c519a667ad Remove image property of ImageTexture 2022-06-07 16:30:54 +02:00
b239275989 Merge pull request #60583 from reduz/placeholder-assets 2022-05-03 16:43:13 +02:00
180e5d3028 Remove RES and REF typedefs in favor of spelled out Ref<>
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
b02c7387c7 Implement placeholder assets
* Placeholder textures
* Placeholder meshes
* Placeholder material

This PR is the first step towards implementing https://github.com/godotengine/godot-proposals/issues/2756
It adds an asset type that uses no resources, which can be used to replace the existing ones on export for using on the upcoming server export.
2022-04-28 12:19:01 +02:00
9381acb6a4 Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
45f74ceb85 Add PortableCompressedTexture
* Resource that allows saving textures embedded in scenes or standalone.
* Supports only formats that are portable: Lossy, Lossles or BasisUniversal

This is something I wanted to add for a long time. I made it now because @fire
requires it for importing GLTF2 files with embedded textures, but also this
will allow saving Godot scenes as standalone binary files that will run
in all platforms (because textures will load everywhere).

This is ideal when you want to distribute individual standalone assets online
in games that can be built from Godot scenes.
2022-03-30 10:39:41 +02:00
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
ccd4cdfd8b Rename StreamTexture* to CompressedTexture*
* Its not and will not be used for streaming.
* Streaming will be implemented in 4.1 and it will work different.
* It makes more sense to be called CompressedTexture since it imports and compresses texture files.
2022-03-05 16:43:38 +01:00
b4f0d4c7db Decrease the default GradientTexture and CurveTexture size
This provides better usability when a GradientTexture or CurveTexture
is added to a Control node.

Visual appearance of most GradientTextures and CurveTextures will
be unaffected.
2022-01-29 00:28:10 +01:00
fe52458154 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
4a32754e78 Merge pull request #54715 from goostengine/gradient-texture-1d-rename 2021-11-08 20:52:24 +03:00
d3c3540329 Remove redundant texture flag setters/getters for CameraTexture 2021-11-07 12:35:10 -07:00
6742a338a8 Rename GradientTexture to GradientTexture1D
1. Explicit and unambiguous when comparing to `GradientTexture2D`
2. Consistent with other class names where 1D is used in the engine.
2021-11-07 15:11:04 +02:00
cd37af4e4c Add GradientTexture2D
Co-authored-by: Mariano Javier Suligoy <marianognu.easyrpg@gmail.com>
Co-authored-by: Andrii Doroshenko <xrayez@gmail.com>
2021-10-12 16:22:30 +02:00
9556c3a30a Merge pull request #53180 from boruok/4.0-fix-atlas-texture-return-null 2021-09-28 18:52:53 +02:00
2cc2adedaa 4.0 fix atlas texture return null 2021-09-28 23:54:47 +09:00
8cba772afc Remove unused ImageTexture functions
* `_resource_path_changed()` does nothing
* `_reload_hook()` has been unused since the beginning of GLES3 renderer
2021-09-14 10:04:26 +08:00
1d257d02db Add an use_hdr property to GradientTexture to allow storing HDR colors
This is disabled by default to save some memory and preserve the existing
behavior of clamping colors.
2021-08-13 23:16:24 +02:00
8f70232a15 Add placeholder textures to ensure CameraTexture / CameraFeed always have valid RIDs. 2021-08-13 12:32:01 +03:00
536825d004 Rename Curve3Texture to CurveXYZTexture
Neither name is a perfect match but `Curve3Texture` looked too similar to
`CurveTexture` and `Curve3D`, which made things confusing when picking a
texture type or browsing the API reference.
2021-07-14 00:30:58 +02:00
d6893cb2e8 Implement Curve3Texture
* This was required by users in some scenarios, such as animating individual axes over time with a single texture.
* Examples: Shaders, Particles, etc.
* CurveTexture now defaults to RGB, can be changed to Red if needed, this allows to freely exchange them.
2021-07-03 12:11:01 -03:00
37776b2867 Clean up RenderingServer and its bindings
* Rewrote bindings for RenderingServer.
* They are now all up to date.
* Several unused methods and deprecated features were cleaned up.
2021-07-01 09:07:36 -03:00
50d1e0ea99 Merge pull request #47835 from mortarroad/master-lossless-webp
Implement lossless WebP encoding
2021-06-11 19:34:36 +02:00
1bc1e94208 Implement lossless WebP encoding 2021-06-11 18:46:04 +02:00