Browse Source

glgsg: Better error when invalid ShaderPtrSpec type is encountered

rdb 1 year ago
parent
commit
2436a06527
1 changed files with 6 additions and 1 deletions
  1. 6 1
      panda/src/glstuff/glShaderContext_src.cxx

+ 6 - 1
panda/src/glstuff/glShaderContext_src.cxx

@@ -2255,7 +2255,12 @@ issue_parameters(int altered) {
             break;
             break;
 
 
           default:
           default:
-            nassertd(false) continue;
+#ifndef NDEBUG
+            GLCAT.error()
+              << "Invalid ShaderPtrSpec type " << (int)ptr_data->_type
+              << " for shader input '" << spec._id._name << "'\n";
+#endif
+            continue;
           }
           }
 
 
           switch (spec._dim[1]) {
           switch (spec._dim[1]) {