initGLContext method

void initGLContext()

Implementation

void initGLContext() {
  extensions = WebGLExtensions(_gl);
  capabilities = WebGLCapabilities(_gl, extensions, parameters);

  extensions.init(capabilities);

  utils = WebGLUtils(_gl, extensions, capabilities);

  state = WebGLState(_gl, extensions, capabilities);

  info = WebGLInfo(_gl);
  properties = WebGLProperties();
  textures = WebGLTextures(_gl, extensions, state, properties, capabilities, utils, info);

  cubemaps = WebGLCubeMaps(this);
  cubeuvmaps = WebGLCubeUVMaps(this);
  attributes = WebGLAttributes(_gl, capabilities);
  bindingStates = WebGLBindingStates(_gl, extensions, attributes, capabilities);
  geometries = WebGLGeometries(_gl, attributes, info, bindingStates);
  objects = WebGLObjects(_gl, geometries, attributes, info);
  morphtargets = WebGLMorphtargets(_gl, capabilities, textures);
  clipping = WebGLClipping(properties);
  programCache = WebGLPrograms(this, cubemaps, cubeuvmaps, extensions, capabilities, bindingStates, clipping);
  materials = WebGLMaterials(this, properties);
  renderLists = WebGLRenderLists();
  renderStates = WebGLRenderStates(extensions, capabilities);
  background = WebGLBackground(this, cubemaps, state, objects, alpha, premultipliedAlpha);

  bufferRenderer = WebGLBufferRenderer(_gl, extensions, info, capabilities);
  indexedBufferRenderer = WebGLIndexedBufferRenderer(_gl, extensions, info, capabilities);

  info.programs = programCache.programs;

  // xr
  xr = WebXRManager(this, _gl);

  // shadow map

  shadowMap = WebGLShadowMap(this, objects, capabilities);

  // print("3 initGLContext ..... ");
}