summaryrefslogtreecommitdiff
path: root/scene/resources/texture.h
AgeCommit message (Collapse)Author
2022-09-06Rework AnimatedTexture's `fps` into `speed_scale`Micky
`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-06Merge pull request #65194 from Mickeon/rename-one-shotRémi Verschelde
2022-09-01Rename AnimatedTexture `oneshot` to `one_shot`Micky
AnimatedTexture.`oneshot` -> `one_shot` For consistency. Every other exposed `one_shot` is spaced out like this.
2022-09-01Change Array arguments to TypedArraykobewi
2022-08-22Make `_validate_property` a multilevel methodYuri Sizov
2022-08-19Unexpose ProxyTextureMax Hilbrunner
2022-07-25Code quality: Fix header guards consistencyRémi Verschelde
Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
2022-07-18Use integer types in Image and ImageTexture methodsFireForge
- 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-08Add static methods for creating Image and ImageTexturekobewi
2022-06-08Re-add internal image field to ImageTexturekobewi
2022-06-07Remove image property of ImageTexturekobewi
2022-05-03Merge pull request #60583 from reduz/placeholder-assetsRémi Verschelde
2022-05-03Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`Hugo Locurcio
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-04-28Implement placeholder assetsreduz
* 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-11Make FileAccess and DirAccess classes reference counted.bruvzg
2022-03-30Add PortableCompressedTexturereduz
* 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-10Discern between virtual and abstract class bindingsreduz
* 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-05Rename StreamTexture* to CompressedTexture*reduz
* 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-01-29Decrease the default GradientTexture and CurveTexture sizeHugo Locurcio
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-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-11-08Merge pull request #54715 from goostengine/gradient-texture-1d-renameYuri Roubinsky
2021-11-07Remove redundant texture flag setters/getters for `CameraTexture`Aaron Record
2021-11-07Rename `GradientTexture` to `GradientTexture1D`Andrii Doroshenko (Xrayez)
1. Explicit and unambiguous when comparing to `GradientTexture2D` 2. Consistent with other class names where 1D is used in the engine.
2021-10-12Add GradientTexture2DHendrik Brucker
Co-authored-by: Mariano Javier Suligoy <marianognu.easyrpg@gmail.com> Co-authored-by: Andrii Doroshenko <xrayez@gmail.com>
2021-09-28Merge pull request #53180 from boruok/4.0-fix-atlas-texture-return-nullRémi Verschelde
2021-09-284.0 fix atlas texture return nullboruok
2021-09-14Remove unused ImageTexture functionsHaoyu Qiu
* `_resource_path_changed()` does nothing * `_reload_hook()` has been unused since the beginning of GLES3 renderer
2021-08-13Add an `use_hdr` property to GradientTexture to allow storing HDR colorsHugo Locurcio
This is disabled by default to save some memory and preserve the existing behavior of clamping colors.
2021-08-13Add placeholder textures to ensure CameraTexture / CameraFeed always have ↵bruvzg
valid RIDs.
2021-07-14Rename Curve3Texture to CurveXYZTextureRémi Verschelde
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-03Implement Curve3Texturereduz
* 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-01Clean up RenderingServer and its bindingsreduz
* Rewrote bindings for RenderingServer. * They are now all up to date. * Several unused methods and deprecated features were cleaned up.
2021-06-11Merge pull request #47835 from mortarroad/master-lossless-webpRémi Verschelde
Implement lossless WebP encoding
2021-06-11Implement lossless WebP encodingMorris Tabor
2021-06-11Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde
File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
2021-05-25Fix some warnings raised by GCC-11.1jfons
2021-04-28Remove obsolete LargeTexture, it's no longer useful since 3.xRémi Verschelde
It existed in early Godot releases to allow working around hardware limitations on max texture sizes (e.g. hardware limits of 1024x1024 pixels). Nowadays the max texture size supported natively by Godot is 16384x16384, and even low end mobile hardware should support at least 4096x4096. The LargeTexture implementation is basically just an array with offsets, sizes and textures and should be easy to replicate with a custom Texture resource if needed - solving most of its bugs on the way as the implementation removed here has various unimplemented or incomplete methods.
2021-03-28Rename Texture.get_data() to get_image()Marcel Admiraal
2021-02-11Improve resource load cachereduz
-Added a new method in Resource: reset_state , used for reloading the same resource from disk -Added a new cache mode "replace" in ResourceLoader, which reuses existing loaded sub-resources but resets their data from disk (or replaces them if they chaged type) -Because the correct sub-resource paths are always loaded now, this fixes bugs with subresource folding or subresource ordering when saving.
2021-02-09Initialize class variables with default values in scene/ [2/2]Rafał Mikrut
2021-01-19Modernize RWLockPedro J. Estébanez
- Based on C++14's `shared_time_mutex` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed - Simpler for `NO_THREADS`
2021-01-01Update copyright statements to 2021Rémi Verschelde
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 🎆
2020-11-16Remove empty lines around braces with the formatting scriptAaron Franke
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-10-24Refactored 2D shader and lighting systemreduz
-Removed normal/specular properties from nodes -Create CanvasTexture, which can contain normal/specular channels -Refactored, optimized and simplified 2D shaders -Use atlas for light textures. -Use a shadow atlas for shadow textures. -Use both items aboves to make light rendering stateless (faster). -Reorganized uniform sets for more efficiency.
2020-09-09Implement 3D textures as import and resource format.reduz
2020-08-30Make `AnimatedTexture.MAX_FRAMES` publicAndrii Doroshenko (Xrayez)
The constant is already exposed in GDScript, but not in C++. This information is useful for implementing animated texture resource importers via modules.
2020-07-10Add override keywords.Marcel Admiraal
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-05-10New lightmapperJuan Linietsky
-Added LocalVector (needed it) -Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too) -Fixes and changes all around the place -Added library for 128 bits fixed point (required for Delaunay3D)