Explorar el Código

patch linkstatus, fix macos issue with receiveShadow

come hace 11 años
padre
commit
33f8506271
Se han modificado 2 ficheros con 6 adiciones y 2 borrados
  1. 3 1
      Babylon/babylon.engine.js
  2. 3 1
      Babylon/babylon.engine.ts

+ 3 - 1
Babylon/babylon.engine.js

@@ -537,7 +537,9 @@
             this._gl.attachShader(shaderProgram, vertexShader);
             this._gl.attachShader(shaderProgram, fragmentShader);
 
-            var linked = this._gl.linkProgram(shaderProgram);
+            this._gl.linkProgram(shaderProgram);
+            
+            var linked = this._gl.getProgramParameter(shaderProgram, this._gl.LINK_STATUS);
             if (!linked) {
                 var error = this._gl.getProgramInfoLog(shaderProgram);
                 if (error) {

+ 3 - 1
Babylon/babylon.engine.ts

@@ -596,7 +596,9 @@
             this._gl.attachShader(shaderProgram, vertexShader);
             this._gl.attachShader(shaderProgram, fragmentShader);
 
-            var linked = this._gl.linkProgram(shaderProgram);
+            this._gl.linkProgram(shaderProgram);
+            
+            var linked = this._gl.getProgramParameter(shaderProgram, this._gl.LINK_STATUS);
             if (!linked) {
                 var error = this._gl.getProgramInfoLog(shaderProgram);
                 if (error) {