Browse Source

gobj: Fix tex not being cleared initially with gl-immutable-texture-storage

Regression as of 494631ac54e8b5bd2cf72f4ffe44b1c565b62b6e and bfe595f4dcfbbd8964b3ee52394ca0988fa7107b (#1168)
rdb 3 years ago
parent
commit
b018d65da9
1 changed files with 3 additions and 0 deletions
  1. 3 0
      panda/src/gobj/texture.I

+ 3 - 0
panda/src/gobj/texture.I

@@ -265,6 +265,9 @@ set_clear_color(const LColor &color) {
   CDWriter cdata(_cycler, true);
   CDWriter cdata(_cycler, true);
   cdata->_clear_color = color;
   cdata->_clear_color = color;
   cdata->_has_clear_color = true;
   cdata->_has_clear_color = true;
+  if (cdata->_image_modified == UpdateSeq::initial()) {
+    cdata->inc_image_modified();
+  }
 }
 }
 
 
 /**
 /**