From 6bd533c7fde4cde0cb022c656fc4f145f70482da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Sun, 23 Aug 2015 00:09:27 +0200 Subject: [PATCH] Fixed a regression on target rendering sync --- src/GLCanvas.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/GLCanvas.js b/src/GLCanvas.js index 1eaeabd..9820717 100644 --- a/src/GLCanvas.js +++ b/src/GLCanvas.js @@ -99,8 +99,6 @@ class GLCanvas extends Component { if (props.shader !== this.props.shader) this.syncShader(props); else { // syncShader will call other syncs so we can save some calls - if (props.targetUniforms) - this.syncTargetUniforms(props); if (!sameUniforms(props.uniforms, this.props.uniforms)) this.syncUniforms(props); } @@ -255,6 +253,11 @@ class GLCanvas extends Component { const gl = this.gl; const shader = this.shader; if (!shader) return; + const props = this.props; + + if (props.targetUniforms) + this.syncTargetUniforms(props); + // Bind the textures for (const uniformName in this._textures) { this._textures[uniformName].bind(this._textureUnits[uniformName]);