void activateRenderFrameBuffer(RenderFrameBuffer renderFrameBuffer)

Source

void activateRenderFrameBuffer(RenderFrameBuffer renderFrameBuffer) {
  if (!identical(renderFrameBuffer, _activeRenderFrameBuffer)) {
    if (renderFrameBuffer is RenderFrameBuffer) {
      _activeRenderProgram.flush();
      _activeRenderFrameBuffer = renderFrameBuffer;
      _activeRenderFrameBuffer.activate(this);
      _renderingContext.viewport(0, 0, renderFrameBuffer.width, renderFrameBuffer.height);
      _updateStencilTest(renderFrameBuffer.renderStencilBuffer.depth);
    } else {
      _activeRenderProgram.flush();
      _activeRenderFrameBuffer = null;
      _renderingContext.bindFramebuffer(gl.FRAMEBUFFER, null);
      _renderingContext.viewport(0, 0, _viewportWidth, _viewportHeight);
      _updateStencilTest(_stencilDepth);
    }
  }
}