Update the underlying WebGL texture with the source of this RenderTexture.
The source of the RenderTexture is an ImageElement, CanvasElement or VideoElement. If changes are made to the source you have to call the update method to apply those changes to the WebGL texture.
The progress in a VideoElement will automatically updated the RenderTexture and you don't need to call the update method.
Source
void update() { if (_renderContext == null || _texture == null) return; if (_renderContext.contextIdentifier != contextIdentifier) return; var target = gl.TEXTURE_2D; var rgba = gl.RGBA; var type = gl.UNSIGNED_BYTE; if (_textureSourceWorkaround) { _canvas.context2D.drawImage(_source, 0, 0); _renderContext.activateRenderTexture(this); _renderingContext.texImage2D(target, 0, rgba, rgba, type, _canvas); } else { _renderContext.activateRenderTexture(this); _renderingContext.texImage2D(target, 0, rgba, rgba, type, _source); } }