initGLContext method
void
initGLContext()
Implementation
void initGLContext() {
_scratchFrameBuffer = _gl.createFramebuffer();
_srcFramebuffer = _gl.createFramebuffer();
_dstFramebuffer = _gl.createFramebuffer();
extensions = WebGLExtensions(_gl);
extensions.init();
utils = WebGLUtils(extensions);
capabilities = WebGLCapabilities(_gl, extensions, parameters, utils);
state = WebGLState(_gl,extensions);
if ( (capabilities as WebGLCapabilities).reverseDepthBuffer && reverseDepthBuffer ) {
state.buffers['depth'].setReversed( true );
}
info = WebGLInfo(_gl);
properties = WebGLProperties();
textures = WebGLTextures(_gl, extensions, state as WebGLState, properties, capabilities as WebGLCapabilities, utils, info);
cubemaps = WebGLCubeMaps(this);
cubeuvmaps = WebGLCubeUVMaps(this);
attributes = WebGLAttributes(_gl);
bindingStates = WebGLBindingStates(_gl, attributes);
geometries = WebGLGeometries(_gl, attributes, info, bindingStates);
objects = WebGLObjects(_gl, geometries, attributes, info);
morphtargets = WebGLMorphtargets(_gl, capabilities as WebGLCapabilities, textures);
clipping = WebGLClipping(properties);
programCache = WebGLPrograms(this, cubemaps, cubeuvmaps, extensions, capabilities as WebGLCapabilities, bindingStates, clipping);
materials = WebGLMaterials(this, properties);
renderLists = WebGLRenderLists();
renderStates = WebGLRenderStates(extensions);
background = WebGLBackground(this, cubemaps, cubeuvmaps, state as WebGLState, objects, alpha, premultipliedAlpha);
shadowMap = WebGLShadowMap(this, objects, capabilities as WebGLCapabilities);
uniformsGroups = WebGLUniformsGroups( _gl, info, capabilities as WebGLCapabilities, state as WebGLState );
bufferRenderer = WebGLBufferRenderer(_gl, extensions, info);
indexedBufferRenderer = WebGLIndexedBufferRenderer(_gl, extensions, info);
info.programs = programCache.programs;
xr = XRManager(this, _gl);
// xr.addEventListener( 'sessionstart', onXRSessionStart );
// xr.addEventListener( 'sessionend', onXRSessionEnd );
}