text: import Framebuffer from '../classes/framebuffer';
  import Texture2D from '../classes/texture-2d';
  export const FEATURES = {
    WEBGL2: 'WEBGL2',
    VERTEX_ARRAY_OBJECT: 'VERTEX_ARRAY_OBJECT',
    TIMER_QUERY: 'TIMER_QUERY',
    INSTANCED_RENDERING: 'INSTANCED_RENDERING',
    MULTIPLE_RENDER_TARGETS: 'MULTIPLE_RENDER_TARGETS',
    ELEMENT_INDEX_UINT32: 'ELEMENT_INDEX_UINT32',
    BLEND_EQUATION_MINMAX: 'BLEND_EQUATION_MINMAX',
    FLOAT_BLEND: 'FLOAT_BLEND',
    COLOR_ENCODING_SRGB: 'COLOR_ENCODING_SRGB',
    TEXTURE_DEPTH: 'TEXTURE_DEPTH',
    TEXTURE_FLOAT: 'TEXTURE_FLOAT',
    TEXTURE_HALF_FLOAT: 'TEXTURE_HALF_FLOAT',
    TEXTURE_FILTER_LINEAR_FLOAT: 'TEXTURE_FILTER_LINEAR_FLOAT',
    TEXTURE_FILTER_LINEAR_HALF_FLOAT: 'TEXTURE_FILTER_LINEAR_HALF_FLOAT',
    TEXTURE_FILTER_ANISOTROPIC: 'TEXTURE_FILTER_ANISOTROPIC',
    COLOR_ATTACHMENT_RGBA32F: 'COLOR_ATTACHMENT_RGBA32F',
    COLOR_ATTACHMENT_FLOAT: 'COLOR_ATTACHMENT_FLOAT',
    COLOR_ATTACHMENT_HALF_FLOAT: 'COLOR_ATTACHMENT_HALF_FLOAT',
    GLSL_FRAG_DATA: 'GLSL_FRAG_DATA',
    GLSL_FRAG_DEPTH: 'GLSL_FRAG_DEPTH',
    GLSL_DERIVATIVES: 'GLSL_DERIVATIVES',
    GLSL_TEXTURE_LOD: 'GLSL_TEXTURE_LOD'
  };
  
  function checkFloat32ColorAttachment(gl) {
    const testTexture = new Texture2D(gl, {
      format: 6408,
      type: 5126,
      dataFormat: 6408
    });
    const testFb = new Framebuffer(gl, {
      id: "test-framebuffer",
      check: false,
      attachments: {
        [36064]: testTexture
      }
    });
    const status = testFb.getStatus();
    testTexture.delete();
    testFb.delete();
    return status === 36053;
  }
  
  export default {
    [FEATURES.WEBGL2]: [false, true],
    [FEATURES.VERTEX_ARRAY_OBJECT]: ['OES_vertex_array_object', true],
    [FEATURES.TIMER_QUERY]: ['EXT_disjoint_timer_query', 'EXT_disjoint_timer_query_webgl2'],
    [FEATURES.INSTANCED_RENDERING]: ['ANGLE_instanced_arrays', true],
    [FEATURES.MULTIPLE_RENDER_TARGETS]: ['WEBGL_draw_buffers', true],
    [FEATURES.ELEMENT_INDEX_UINT32]: ['OES_element_index_uint', true],
    [FEATURES.BLEND_EQUATION_MINMAX]: ['EXT_blend_minmax', true],
    [FEATURES.FLOAT_BLEND]: ['EXT_float_blend'],
    [FEATURES.COLOR_ENCODING_SRGB]: ['EXT_sRGB', true],
    [FEATURES.TEXTURE_DEPTH]: ['WEBGL_depth_texture', true],
    [FEATURES.TEXTURE_FLOAT]: ['OES_texture_float', true],
    [FEATURES.TEXTURE_HALF_FLOAT]: ['OES_texture_half_float', true],
    [FEATURES.TEXTURE_FILTER_LINEAR_FLOAT]: ['OES_texture_float_linear'],
    [FEATURES.TEXTURE_FILTER_LINEAR_HALF_FLOAT]: ['OES_texture_half_float_linear'],
    [FEATURES.TEXTURE_FILTER_ANISOTROPIC]: ['EXT_texture_filter_anisotropic'],
    [FEATURES.COLOR_ATTACHMENT_RGBA32F]: [checkFloat32ColorAttachment, 'EXT_color_buffer_float'],
    [FEATURES.COLOR_ATTACHMENT_FLOAT]: [false, 'EXT_color_buffer_float'],
    [FEATURES.COLOR_ATTACHMENT_HALF_FLOAT]: ['EXT_color_buffer_half_float'],
    [FEATURES.GLSL_FRAG_DATA]: ['WEBGL_draw_buffers', true],
    [FEATURES.GLSL_FRAG_DEPTH]: ['EXT_frag_depth', true],
    [FEATURES.GLSL_DERIVATIVES]: ['OES_standard_derivatives', true],
    [FEATURES.GLSL_TEXTURE_LOD]: ['EXT_shader_texture_lod', true]
  };
  //# sourceMappingURL=webgl-features-table.js.map