void activate(RenderContextWebGL renderContext)

Source

void activate(RenderContextWebGL renderContext) {

  if (_contextIdentifier != renderContext.contextIdentifier) {
    _contextIdentifier = renderContext.contextIdentifier;
    _renderStatistics = renderContext.renderStatistics;
    _renderingContext = renderContext.rawContext;
    _buffer = _renderingContext.createBuffer();
    _renderingContext.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _buffer);
    _renderingContext.bufferData(gl.ELEMENT_ARRAY_BUFFER, data, usage);
  }

  _renderingContext.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _buffer);
}