Explorar o código

patch linkstatus, fix macos issue with receiveShadow

come %!s(int64=11) %!d(string=hai) anos
pai
achega
33f8506271
Modificáronse 2 ficheiros con 6 adicións e 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) {