Kaynağa Gözat

logs compiled shader log instead of returning error

leonsal 8 yıl önce
ebeveyn
işleme
c8e6e1b05f
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 3 3
      gls/program.go

+ 3 - 3
gls/program.go

@@ -498,10 +498,10 @@ func CompileShader(stype uint32, source string) (uint32, error) {
 		return shader, fmt.Errorf("%s", slog)
 	}
 
-	// Even if the shader compiled OK, if the log has data,
-	// return error to see warnings
+	// If the shader compiled OK but the log has data,
+	// logs this data instead of returning error
 	if len(slog) > 2 {
-		return shader, fmt.Errorf("%s", slog)
+		log.Warn("%s", slog)
 	}
 	return shader, nil
 }