-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement loading DDS textures at run-time again #101549
base: master
Are you sure you want to change the base?
Implement loading DDS textures at run-time again #101549
Conversation
Co-authored-by: Marcin Nowak <marcin.j.nowak@gmail.com>
When you're ready I'll try to review this for Godot Engine 4.5 |
@@ -77,11 +78,13 @@ class ImageFormatLoaderExtension : public ImageFormatLoader { | |||
public: | |||
virtual Error load_image(Ref<Image> p_image, Ref<FileAccess> p_fileaccess, BitField<ImageFormatLoader::LoaderFlags> p_flags = FLAG_NONE, float p_scale = 1.0) override; | |||
virtual void get_recognized_extensions(List<String> *p_extensions) const override; | |||
virtual bool should_import(const String &p_resource_type) const override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
virtual bool should_import(const String &p_resource_type) const override;
I think this was added so that Godot Engine can ignore this format loader?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah with #100538, should_import
enables format loaders to designate when they would and would not be ignored by the import process based on the resource type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels wrong on a gut feeling; I've been ignoring this problem in my other pull request. #101994
Reason I have this as a draft is really because I'm waiting on whether anything in #100538 needs any changes, this is practically ready outside that. |
ImageFormatLoader
Resource import #100538Adds:
Image::load_dds_from_buffer()
Image::load_from_file
All the DDS layer loading has been moved from texture loader to image loader as handling layers is a little awkward compared to how the other loaders are handled.