소스 검색

glgsg: properly handle shader compilation failure

Fixes #645
rdb 6 년 전
부모
커밋
f25532db78
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      panda/src/glstuff/glShaderContext_src.cxx

+ 4 - 0
panda/src/glstuff/glShaderContext_src.cxx

@@ -3206,6 +3206,10 @@ glsl_compile_and_link() {
     valid &= glsl_compile_shader(Shader::ST_compute);
     valid &= glsl_compile_shader(Shader::ST_compute);
   }
   }
 
 
+  if (!valid) {
+    return false;
+  }
+
   // There might be warnings, so report those.  GLSLShaders::const_iterator
   // There might be warnings, so report those.  GLSLShaders::const_iterator
   // it; for (it = _glsl_shaders.begin(); it != _glsl_shaders.end(); ++it) {
   // it; for (it = _glsl_shaders.begin(); it != _glsl_shaders.end(); ++it) {
   // glsl_report_shader_errors(*it); }
   // glsl_report_shader_errors(*it); }