-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Add DDS image load and save functionality #101994
base: master
Are you sure you want to change the base?
Conversation
e0950f4
to
ffd39de
Compare
9adaa31
to
02e11e1
Compare
02e11e1
to
f335f2d
Compare
422c89d
to
97fcc8c
Compare
97fcc8c
to
6912cfb
Compare
If info from the related MoltenVK issue I have mentioned here is correct, changing CI from |
@bruvzg Is it possible/advisable to check for macOS-15 or newer at runtime? |
Yes: if (@available(macOS 15.0, *)) {
// If it's Objective-C code.
} or if (__builtin_available(macOS 15.0, *)) {
// If it's C++ code.
} |
How do I invert it? I want an if not if (__builtin_available(macOS 15.0, *)) {
// If it's C++ code.
} |
1077754
to
0f9280f
Compare
0f9280f
to
0c249b5
Compare
32e1352
to
792acf7
Compare
This comment was marked as outdated.
This comment was marked as outdated.
792acf7
to
6743043
Compare
This comment was marked as resolved.
This comment was marked as resolved.
7fd93df
to
290131f
Compare
Modified: } else if (mip_image->get_format() == Image::FORMAT_RGB565) {
// RGB565 to BGR565
const int64_t data_size = data.size();
uint8_t *wb = data.ptrw();
for (int64_t i = 0; i < data_size; i += 2) {
uint16_t px = wb[i] | (wb[i + 1] << 8);
uint8_t r = (px >> 11) & 0x1F;
uint8_t g = (px >> 5) & 0x3F;
uint8_t b = px & 0x1F;
uint16_t out_px = (b << 11) | (g << 5) | r;
wb[i + 0] = out_px & 0xFF;
wb[i + 1] = (out_px >> 8) & 0xFF;
} |
811531d
to
e6aff30
Compare
This comment was marked as resolved.
This comment was marked as resolved.
e6aff30
to
2c4dd12
Compare
Commentary in rocketchat mentioned:
|
Save and load DDS from Image class. Co-authored-by: BlueCube3310 <[email protected]>
2c4dd12
to
4e1450d
Compare
See: godotengine/godot-proposals#5748
The proposal involves adding the ImageLoaderDDS class, moving the DDS handling code inside it, and reusing the image loader (or part of it) in the texture loader in the future.
We are not supporting saving non-2d textures at this moment. Feature enhancement wanted.
BetsyCompressor has a runtime execution errorRendering team is handling it.Image.load_dds_from_buffer()
Image.save_dds_from_buffer()
Error save_dds(const String &p_path) const
Vector<uint8_t> save_dds_to_buffer() const