Explorar o código

Merge pull request #9610 from Popov72/improve-errmsg

Improve error message when a shader object can't be created
sebavan %!s(int64=4) %!d(string=hai) anos
pai
achega
8acb1e97d9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Engines/thinEngine.ts

+ 1 - 1
src/Engines/thinEngine.ts

@@ -2250,7 +2250,7 @@ export class ThinEngine {
         var shader = gl.createShader(type === "vertex" ? gl.VERTEX_SHADER : gl.FRAGMENT_SHADER);
 
         if (!shader) {
-            throw new Error("Something went wrong while compile the shader.");
+            throw new Error(`Something went wrong while creating a gl ${type} shader object. gl error=${gl.getError()}`);
         }
 
         gl.shaderSource(shader, source);