mirror of
https://github.com/gre/gl-react.git
synced 2026-01-18 16:16:59 +00:00
Fixed a regression on target rendering sync
This commit is contained in:
parent
b9d490effb
commit
6bd533c7fd
@ -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]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user