فهرست منبع

additional debug output

David Rose 16 سال پیش
والد
کامیت
e0a7f0fed7
1فایلهای تغییر یافته به همراه12 افزوده شده و 0 حذف شده
  1. 12 0
      panda/src/glstuff/glGraphicsStateGuardian_src.cxx

+ 12 - 0
panda/src/glstuff/glGraphicsStateGuardian_src.cxx

@@ -7430,6 +7430,13 @@ upload_texture(CLP(TextureContext) *gtc, bool force) {
     image_compression = Texture::CM_off;
   } 
 
+  if (GLCAT.is_debug()) {
+    if (image.is_null()) {
+      GLCAT.debug()
+        << "Got NULL image: " << tex->get_name() << "\n";
+    }
+  }
+
   /*
   if (image.is_null()) {
     // If we don't have an image, we can't upload.
@@ -7693,6 +7700,11 @@ upload_texture_image(CLP(TextureContext) *gtc,
   bool load_ram_mipmaps = false;
 
   if (image.is_null()) {
+    if (GLCAT.is_debug()) {
+      GLCAT.debug()
+        << "Not loading NULL image " << tex->get_name() << "\n";
+    }
+
     if (uses_mipmaps) {
       if (_supports_generate_mipmap) {
         GLP(TexParameteri)(texture_target, GL_GENERATE_MIPMAP, true);