From 707b4fb86642f9f93d431afb807478ea491f1f08 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 18 Mar 2020 17:51:39 +0100 Subject: [PATCH] gobj: don't strip .bam textures that contain only a clear color Second part of the fix for #844 --- panda/src/gobj/texture.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/panda/src/gobj/texture.cxx b/panda/src/gobj/texture.cxx index 2416957b19..7c200c2353 100644 --- a/panda/src/gobj/texture.cxx +++ b/panda/src/gobj/texture.cxx @@ -9951,9 +9951,11 @@ do_write_datagram_header(CData *cdata, BamWriter *manager, Datagram &me, bool &h << "Unsupported bam-texture-mode: " << (int)file_texture_mode << "\n"; } - if (filename.empty() && do_has_bam_rawdata(cdata)) { - // If we don't have a filename, we have to store rawdata anyway. - has_rawdata = true; + if (filename.empty()) { + if (do_has_bam_rawdata(cdata) || cdata->_has_clear_color) { + // If we don't have a filename, we have to store rawdata anyway. + has_rawdata = true; + } } me.add_string(get_name());