diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-02-11 16:01:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-11 16:01:55 +0100 |
commit | 1eb424ec9549bdd086dfb54c847d107519be73d9 (patch) | |
tree | d9a3ec0c72f3a4eda02e16ed883f560e02cf1ccf /modules/pvr | |
parent | 3e3f8a47616327d7faeb17f558bb81a943385e82 (diff) | |
parent | db81928e08cb58d5f67908c6dfcf9433e572ffe8 (diff) |
Merge pull request #36098 from godotengine/vulkan
Add initial Vulkan support, master branch goes UNSTABLE
Diffstat (limited to 'modules/pvr')
-rw-r--r-- | modules/pvr/texture_loader_pvr.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp index 65c21d5af8..36f2fe1ba1 100644 --- a/modules/pvr/texture_loader_pvr.cpp +++ b/modules/pvr/texture_loader_pvr.cpp @@ -154,16 +154,11 @@ RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path, w.release(); - int tex_flags = Texture::FLAG_FILTER | Texture::FLAG_REPEAT; - - if (mipmaps) - tex_flags |= Texture::FLAG_MIPMAPS; - Ref<Image> image = memnew(Image(width, height, mipmaps, format, data)); ERR_FAIL_COND_V(image->empty(), RES()); Ref<ImageTexture> texture = memnew(ImageTexture); - texture->create_from_image(image, tex_flags); + texture->create_from_image(image); if (r_error) *r_error = OK; @@ -177,12 +172,12 @@ void ResourceFormatPVR::get_recognized_extensions(List<String> *p_extensions) co } bool ResourceFormatPVR::handles_type(const String &p_type) const { - return ClassDB::is_parent_class(p_type, "Texture"); + return ClassDB::is_parent_class(p_type, "Texture2D"); } String ResourceFormatPVR::get_resource_type(const String &p_path) const { if (p_path.get_extension().to_lower() == "pvr") - return "Texture"; + return "Texture2D"; return ""; } |