rebindTextures method

void rebindTextures(
  1. RenderTarget renderTarget,
  2. dynamic colorTexture,
  3. dynamic depthTexture
)

Implementation

void rebindTextures(RenderTarget renderTarget, colorTexture, depthTexture) {
  var renderTargetProperties = properties.get(renderTarget);

  if (colorTexture != null) {
    setupFrameBufferTexture(renderTargetProperties["__webglFramebuffer"], renderTarget, renderTarget.texture,
        _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D);
  }

  if (depthTexture != null) {
    setupDepthRenderbuffer(renderTarget);
  }
}