Browse Source

shader: Make Cg load calls fail if compiling without Cg toolkit

rdb 5 years ago
parent
commit
7d94f601db
1 changed files with 2 additions and 0 deletions
  1. 2 0
      panda/src/gobj/shader.cxx

+ 2 - 0
panda/src/gobj/shader.cxx

@@ -2525,6 +2525,7 @@ read(const ShaderFile &sfile, BamCacheRecord *record) {
 #else
       shader_cat.error()
         << "Tried to load Cg shader, but no Cg support is enabled.\n";
+      return false;
 #endif
     } else {
       shader_cat.error()
@@ -2618,6 +2619,7 @@ load(const ShaderFile &sbody, BamCacheRecord *record) {
 #else
       shader_cat.error()
         << "Tried to load Cg shader, but no Cg support is enabled.\n";
+      return false;
 #endif
     } else {
       shader_cat.error()