mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
allow automatic decompression when writing textures to file
This commit is contained in:
parent
0c4fdfe262
commit
88d573917e
@ -2665,15 +2665,18 @@ do_read_dds(istream &in, const string &filename, bool header_only) {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
bool Texture::
|
||||
do_write(const Filename &fullpath, int z, int n, bool write_pages, bool write_mipmaps) const {
|
||||
if (!do_has_ram_image()) {
|
||||
((Texture *)this)->do_get_ram_image();
|
||||
}
|
||||
nassertr(do_has_ram_image(), false);
|
||||
|
||||
if (is_txo_filename(fullpath)) {
|
||||
if (!do_has_ram_image()) {
|
||||
((Texture *)this)->do_get_ram_image();
|
||||
}
|
||||
nassertr(do_has_ram_image(), false);
|
||||
return do_write_txo_file(fullpath);
|
||||
}
|
||||
|
||||
if (!do_has_uncompressed_ram_image()) {
|
||||
((Texture *)this)->do_get_uncompressed_ram_image();
|
||||
}
|
||||
|
||||
nassertr(do_has_ram_mipmap_image(n), false);
|
||||
nassertr(_ram_image_compression == CM_off, false);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user