xzw 3 anos atrás
pai
commit
c4feab204b
1 arquivos alterados com 4 adições e 0 exclusões
  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;