|
@@ -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;
|