resize method

void resize(
  1. int width,
  2. int height
)

Implementation

void resize(int width, int height) {
  if (_width != width || _height != height) {
    _width = width;
    _height = height;

    if (_renderContext == null || _renderbuffer == null) return;
    if (_renderContext!.contextIdentifier != contextIdentifier) return;

    _renderContext!.activateRenderStencilBuffer(this);
    _renderingContext!.renderbufferStorage(
        gl.WebGL.RENDERBUFFER, gl.WebGL.DEPTH_STENCIL, _width, _height);
  }
}