xzw před 3 roky
rodič
revize
c4feab204b
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 4 0
      src/PotreeRenderer.js

+ 4 - 0
src/PotreeRenderer.js

@@ -226,6 +226,10 @@ class Shader {
 			this.vs = gl.createShader(gl.VERTEX_SHADER);
 			this.fs = gl.createShader(gl.FRAGMENT_SHADER);
 			this.program = gl.createProgram();
+            
+            if(  !gl.isProgram(this.program  )){//创建失败
+                console.error('创建program失败')
+            }
 
 			for(let name of Object.keys(attributeLocations)){
 				let location = attributeLocations[name].location;