WebGLBindingStates constructor

WebGLBindingStates(
  1. dynamic gl,
  2. WebGLExtensions extensions,
  3. WebGLAttributes attributes,
  4. WebGLCapabilities capabilities,
)

Implementation

WebGLBindingStates(
  this.gl,
  this.extensions,
  this.attributes,
  this.capabilities,
) {
  maxVertexAttributes = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);

  bindingStates = <int, dynamic>{};

  extension = capabilities.isWebGL2
      ? null
      : extensions.get('OES_vertex_array_object');
  vaoAvailable = capabilities.isWebGL2 || extension != null;

  defaultState = createBindingState(null);
  currentState = defaultState;
}