summaryrefslogtreecommitdiff
path: root/scene/resources/texture.cpp
AgeCommit message (Collapse)Author
2020-11-17Describe `ImageTexture`, `Image` creation and usageAndrii Doroshenko (Xrayez)
2020-11-12Improve error messages related to failing to open filesNick Swoboda
2020-10-26Merge pull request #43075 from Xrayez/color-ramp-to-gradientRémi Verschelde
Fixup `ColorRamp` to `Gradient` renames
2020-10-25Fixup `ColorRamp` to `Gradient` renamesAndrii Doroshenko (Xrayez)
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-10-18Refactor MethodBind to use variadic templatesreduz
Removed make_binders and the old style generated binders.
2020-09-09Implement 3D textures as import and resource format.reduz
2020-07-21Fix spelling & grammar in comments, docs, and messagesAndy Maloney
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
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-12doc: Sync classref with current sourceRémi Verschelde
Adds API changes from the new GPU lightmapper.
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)
2020-05-10Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde
Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
2020-04-29Add set_frame, pause, and oneshot to AnimatedTextureRevan Ji
Add API documentation for said changes.
2020-04-20Exposed RenderingDevice to script APIJuan Linietsky
Also added an easier way to load native GLSL shaders. Extras: Had to fix no-cache for subresources in resource loader, it was not properly working, making shaders not properly reload. Note: The precommit hooks are broken because they don't seem to support enums from one class being used in another. Feel free to fix this after merging this PR.
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-27Renaming of servers for coherency.Juan Linietsky
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
2020-03-17Style: Set clang-format Standard to Cpp11Rémi Verschelde
For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
2020-02-28Merge pull request #36640 from reduz/resource-loader-refactorRémi Verschelde
Removed ResourceInteractiveLoader, add built-in threaded loading.
2020-02-28Removed interactive loader, added proper thread loading.Juan Linietsky
2020-02-28Signals: Manually port most of remaining connect_compat usesRémi Verschelde
It's tedious work... Some can't be ported as they depend on private or protected methods of different classes, which is not supported by callable_mp (even if it's a class inherited by the current one).
2020-02-28Signals: Port connect calls to use callable_mpRémi Verschelde
Remove now unnecessary bindings of signal callbacks in the public API. There might be some false positives that need rebinding if they were meant to be public. No regular expressions were harmed in the making of this commit. (Nah, just kidding.)
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-20Fixes crash when loading StreamTexture from fileHaoyu Qiu
2020-02-18PoolVector is gone, replaced by VectorJuan Linietsky
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
2020-02-16Fixes memory leak when loading StreamTextureHaoyu Qiu
2020-02-12doc: Sync classref with current sourceRémi Verschelde
Lots of internal API changes and some docstrings were lost in the conversion. I manually salvaged many of them but for all the rendering-related ones, an additional pass is needed. Added missing enum bindings in BaseMaterial3D and VisualServer.
2020-02-11Rewritten StreamTexture for better code reuse, added basis universal supportJuan Linietsky
2020-02-11Several fixes to 3D rendering, and multimesh implementation.Juan Linietsky
2020-02-11Bugfixes and ability to better specify filter and repeat modes everywhere.Juan Linietsky
Removes antialiased flag for draw_* methods.
2020-02-11basic 2D engine is more or less working with Vulkan, including editor.Juan Linietsky
Still a lot to do
2020-02-11A lot of progress with canvas rendering, still far from working.Juan Linietsky
2020-02-11Texture refactorJuan Linietsky
-Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
2020-02-05Add do..while(0) wrappers to macros without one.Marcel Admiraal
- Add do..while(0) wrapper to ERR_FAIL_NULL macros. - Add do..while(0) wrapper to ERR_FAIL_COND macros. - Add do..while(0) wrapper to ERR_CONTINUE macros. - Add do..while(0) wrapper to ERR_BREAK macros. - Add do..while(0) wrapper to CRASH_COND macros. - Add do..while(0) wrapper to ERR_FAIL macros. - Add do..while(0) wrapper to ERR_PRINT macros. - Add do..while(0) wrapper to WARN_PRINT macros. - Add do..while(0) wrapper to WARN_DEPRECATED macros. - Add do..while(0) wrapper to CRASH_NOW macros.
2020-01-06Merge pull request #34303 from Chaosus/fix_texture_crashRémi Verschelde
Fixed crash if passing invalid image ref to TextureLayered
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-12-12Fixed crash if passing invalid image ref to TextureLayeredYuri Roubinsky
2019-12-11Validates texture in set_piece_textureHaoyu Qiu
2019-11-10Memory leak and crash fixesRafał Mikrut
2019-10-07Merge pull request #32351 from nekomatata/texture-rect-size-updateRémi Verschelde
Update TextureRect when its Texture is modified directly
2019-10-05Update TextureRect and Sprite when their Texture is modified directly.PouleyKetchoupp
Modified Sprite to use "changed" signal instead of _changed_callback to make it work when tool is disabled (change receptors are editor only). Fixes #32349
2019-09-25Added some obvious errors explanationsqarmin
2019-08-09Remove ERR_EXPLAIN from scene/* codeTomasz Chabora
2019-07-01Merge pull request #29980 from Dentrax/directed-by-qarminRémi Verschelde
Fix some editor crashes
2019-07-01fix some crashesFurkan Türkal
2019-06-24Set to enum variables, only correct valuesqarmin
2019-06-15Adding a new Camera Server implementation to Godot.BastiaanOlij
This is a new singleton where camera sources such as webcams or cameras on a mobile phone can register themselves with the Server. Other parts of Godot can interact with this to obtain images from the camera as textures. This work includes additions to the Visual Server to use this functionality to present the camera image in the background. This is specifically targetted at AR applications.
2019-06-11Fix error macro calls not ending with semicolonRémi Verschelde
It's not necessary, but the vast majority of calls of error macros do have an ending semicolon, so it's best to be consistent. Most WARN_DEPRECATED calls did *not* have a semicolon, but there's no reason for them to be treated differently.