Commit graph

81 commits

Author SHA1 Message Date
Rémi Verschelde 49646383f1
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 🎆

(cherry picked from commit b5334d14f7)
2021-01-13 16:17:06 +01:00
Theogen Ratkin 8f6a6ac8d0 Add interpolation parameter to resize_to_po2()
Image::resize_to_po2() now takes an optional p_interpolation parameter
that it passes directly to resize() with default value INTERPOLATE_BILINEAR.

GLES2: call resize_to_po2() with interpolate argument

Call resize_to_po2() in GLES2 rasterizer storage with either
INTERPOLATE_BILINEAR or INTERPOLATE_NEAREST depending on TEXTURE_FLAG_FILTER.

This avoids filtering issues with non power of two pixel art textures.
See #44379
2020-12-18 14:02:38 -04:00
Hugo Locurcio 7db872b55a
Add Image.load_bmp_from_buffer() for run-time BMP image loading
This partially addresses
https://github.com/godotengine/godot-proposals/issues/676.

(cherry picked from commit 0209e3790e)
2020-11-11 15:30:55 +01:00
Paul Herman 850f07a4d9 Expose loading TGA images in Image.
(cherry picked from commit 7d4b3e6587)
2020-07-03 13:17:57 +02:00
Andrii Doroshenko (Xrayez) a3cad44f44 Add Image.save_png_to_buffer method
Backported from da0457fa29.

This commit additionally exposes the method to scripting (4.0).
2020-05-20 15:38:20 +03:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
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.
2020-01-01 11:16:22 +01:00
qarmin 17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Andrii Doroshenko (Xrayez) c362527cb5 Modify outdated comments and error messages regarding indexed images
Godot doesn't support indexed images anymore (FORMAT_INDEXED),
so those are removed to avoid any confusion.
2019-08-26 18:21:19 +03:00
Marc Gilleron cd2de77b04 Add Image.save_exr() 2019-08-07 21:17:47 +01:00
qarmin 4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
Daw11 28bff3d1ad Implement Lanczos image filter 2019-05-05 14:03:56 +02:00
Juan Linietsky 6cb841edcb Ensure ETC2 textures are ALSO compressed to Po2 when have mipmaps. Fixes #26733 2019-03-07 12:16:20 -03:00
Rémi Verschelde b7cc2bb1e2 Core: Ensure classes match their header filename
Also drop some unused files.

Renamed:
- `core/dvector.h` -> `pool_vector.h`
- `core/io/resource_import.h` -> `resource_importer.h`
- `core/sort.h` -> `sort_array.h`
- `core/string_db.h` -> `string_name.h`

Dropped:
- `core/allocators.h`
- `core/os/shell.h`
- `core/variant_construct_string.cpp`
2019-02-12 13:34:25 +01:00
Rémi Verschelde cc0842f9a6 Prevent upscaled SVG from exceeding Image bounds
Also expose Image MAX_WIDTH and MAX_HEIGHT.

Fixes #24455.
2019-01-28 16:00:15 +01:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Juan Linietsky f141f747de Fix Squish decompression, closes #18109 2018-11-16 19:12:00 -03:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
elasota 4cd866685e Use cluster fit at higher quality levels 2018-08-22 12:05:25 -04:00
elasota 35f6ba5c5d BPTC support 2018-08-21 22:56:04 -04:00
Aaron Franke cf136a91d6 [Core] Completely kill math_2d.h, change includes 2018-08-11 03:08:34 -05:00
Juan Linietsky edde52c8de Added proper import support for 3D and Array textures 2018-08-06 14:56:06 -03:00
Juan Linietsky b66580927e
Merge pull request #19313 from RandomShaper/improve-image
Image trilinear scaling + Optimization
2018-07-23 16:21:45 -03:00
Pedro J. Estébanez 8c05c2830c Add trilinear filtering to image scaling 2018-07-23 21:08:10 +02:00
geequlim c5efe5d625 Add webp buffer loader for Image
Cleanup the code memory load related code for Image
Fix jpeg buff load function always returns OK event failed
2018-07-17 12:03:45 +08:00
Juan Linietsky e179bf0726 Ensure, if a texture meant for a normal map is imported and size limit exists, that it's renormalized after resize. 2018-07-03 10:56:31 -03:00
karroffel 130bf14ac8 added rgbe_to_srgb method to Image 2018-05-30 21:16:45 +02:00
Juan Linietsky 863781dd3c
Merge pull request #18505 from AlexHolly/image-point2-helper
add Point2 helper for Image.get_pixel and Image.set_pixel
2018-05-07 12:20:32 -03:00
Juan Linietsky 6244b9e2e1 Add option to renormalize mipmaps when generating them for normalmaps.
Reduces some aliasing.
2018-04-29 21:52:21 -03:00
Alexander Holland 97485c8df0 add Point2 helper for Image.get_pixel and Image.set_pixel
image-point2-helper
2018-04-29 15:17:06 +02:00
Neil Graham 617d3cde1a change to clang format 2018-02-24 13:59:02 +13:00
Neil Graham bc7db7a08d add Image::bumpmap_to_normalmap conversion function 2018-02-21 11:43:58 +13:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Juan Linietsky 474523d409
Revert "Add missing image format RGB10A2. Fixes #14964" 2018-01-03 16:43:07 -03:00
Rémi Verschelde 6d812ad27f
Merge pull request #15051 from binbitten/bug-fixes
Add missing image format RGB10A2. Fixes #14964
2018-01-03 10:17:48 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
binbitten 267bad6b4c Add missing image format RGB10A2. Fixes #14964 2017-12-25 21:01:01 +01:00
Juan Linietsky c9d88fd8e8 Add functions to image to load a PNG or JPG from a buffer, closes #4024 2017-12-20 17:17:12 -03:00
Daniel J. Ramirez 59c2e8906a Improved packed scene previews. 2017-11-17 21:42:14 -06:00
Rémi Verschelde bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Andrii Doroshenko (Xrayez) 4de96518c8 Add handy get_size() method to Image class 2017-08-26 15:01:21 +03:00
ducdetronquito 566655adc1 [#9292] Renamed Image.put_pixel() to set_pixel(). 2017-07-07 19:05:45 +02:00
dumitru-stama 9ce0538ab3 Added 'blit_rect_mask' for 3.0 too 2017-06-24 08:53:54 -07:00
d 053a4fdcd9 Added two new methods to 3.0 'blend_rect_mask' and 'fill' 2017-06-18 11:29:37 -07:00
George Marques b1537da605 Merge pull request #9231 from dumitru-stama/constimg
Fixed a bug in get_pixel not being const
2017-06-16 22:09:26 -03:00
Juan Linietsky b19225bfce -Fix freezes caused by etccomp2, closes #9183
-Normalmaps are now detected and imported as RGTC, both in S3TC and ETC2, this improves their quality.
2017-06-16 21:49:37 -03:00
dumitru.stama 7787700aca Fixed a bug in get_pixel not being const 2017-06-16 17:29:05 -07:00
Juan Linietsky a8e845a474 Merge pull request #8548 from tagcup/etc2comp
Add ETC1/ETC2 compression support though etc2comp.
2017-06-13 19:17:13 -03:00
Juan Linietsky 612ab8fcdb -Restored multithread capability to VisualServer
-Restored resource previews!
2017-06-09 00:24:18 -03:00
Ferenc Arn 6a9c990da7 Add ETC1/ETC2 compression support though etc2comp.
Remove rg-etc1 code. Also updated travis to use ubuntu 14.04.

Fixes #8457.
2017-05-31 18:59:00 -05:00
Juan Linietsky a134f58fb3 rewritten PBR implementation to make it friendlier with Blender 2017-05-31 20:29:56 -03:00