WebGLTextures constructor

WebGLTextures(
  1. RenderingContext gl,
  2. WebGLExtensions extensions,
  3. WebGLState state,
  4. WebGLProperties properties,
  5. WebGLCapabilities capabilities,
  6. WebGLUtils utils,
  7. WebGLInfo info,
)

Implementation

WebGLTextures(this.gl, this.extensions, this.state, this.properties, this.capabilities, this.utils, this.info) {
  maxTextures = capabilities.maxTextures;
  maxCubemapSize = capabilities.maxCubemapSize;
  maxTextureSize = capabilities.maxTextureSize;
  maxSamples = capabilities.maxSamples;
  multisampledRenderToTextureExtension = extensions.has('WEBGL_multisampled_render_to_texture') != null
      ? extensions.get('WEBGL_multisampled_render_to_texture')
      : null;

  wrappingToGL[RepeatWrapping] = WebGL.REPEAT;
  wrappingToGL[ClampToEdgeWrapping] = WebGL.CLAMP_TO_EDGE;
  wrappingToGL[MirroredRepeatWrapping] = WebGL.MIRRORED_REPEAT;

  filterToGL[NearestFilter] = WebGL.NEAREST;
  filterToGL[NearestMipmapNearestFilter] = WebGL.NEAREST_MIPMAP_NEAREST;
  filterToGL[NearestMipmapLinearFilter] = WebGL.NEAREST_MIPMAP_LINEAR;
  filterToGL[LinearFilter] = WebGL.LINEAR;
  filterToGL[LinearMipmapNearestFilter] = WebGL.LINEAR_MIPMAP_NEAREST;
  filterToGL[LinearMipmapLinearFilter] = WebGL.LINEAR_MIPMAP_LINEAR;

  // TODO FIXME when on web && is OculusBrowser
  // supportsInvalidateFramenbuffer = kIsWeb && RegExp(r"OculusBrowser").hasMatch( navigator.userAgent );
}