mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Remove obsolete LargeTexture, it's no longer useful since 3.x
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.
This commit is contained in:
parent
f879a08a62
commit
0e93a1df79
9 changed files with 3 additions and 323 deletions
|
@ -81,7 +81,6 @@ bool EditorTexturePreviewPlugin::generate_small_preview_automatically() const {
|
|||
Ref<Texture2D> EditorTexturePreviewPlugin::generate(const RES &p_from, const Size2 &p_size) const {
|
||||
Ref<Image> img;
|
||||
Ref<AtlasTexture> atex = p_from;
|
||||
Ref<LargeTexture> ltex = p_from;
|
||||
if (atex.is_valid()) {
|
||||
Ref<Texture2D> tex = atex->get_atlas();
|
||||
if (!tex.is_valid()) {
|
||||
|
@ -94,8 +93,6 @@ Ref<Texture2D> EditorTexturePreviewPlugin::generate(const RES &p_from, const Siz
|
|||
}
|
||||
|
||||
img = atlas->get_rect(atex->get_region());
|
||||
} else if (ltex.is_valid()) {
|
||||
img = ltex->to_image();
|
||||
} else {
|
||||
Ref<Texture2D> tex = p_from;
|
||||
if (tex.is_valid()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue