|
@@ -1,10 +1,10 @@
|
|
|
/**
|
|
|
- * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
|
+ * Copyright (c) 2018-2023 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
|
*
|
|
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
|
*/
|
|
|
|
|
|
-import { GLRenderingContext, COMPAT_instanced_arrays, COMPAT_standard_derivatives, COMPAT_vertex_array_object, getInstancedArrays, getStandardDerivatives, COMPAT_element_index_uint, getElementIndexUint, COMPAT_texture_float, getTextureFloat, COMPAT_texture_float_linear, getTextureFloatLinear, COMPAT_blend_minmax, getBlendMinMax, getFragDepth, COMPAT_frag_depth, COMPAT_color_buffer_float, getColorBufferFloat, COMPAT_draw_buffers, getDrawBuffers, getShaderTextureLod, COMPAT_shader_texture_lod, getDepthTexture, COMPAT_depth_texture, COMPAT_sRGB, getSRGB, getTextureHalfFloat, getTextureHalfFloatLinear, COMPAT_texture_half_float, COMPAT_texture_half_float_linear, COMPAT_color_buffer_half_float, getColorBufferHalfFloat, getVertexArrayObject, getDisjointTimerQuery, COMPAT_disjoint_timer_query, getNoNonInstancedActiveAttribs, getDrawBuffersIndexed, COMPAT_draw_buffers_indexed, getParallelShaderCompile, COMPAT_parallel_shader_compile, getFboRenderMipmap, COMPAT_fboRenderMipmap } from './compat';
|
|
|
+import { GLRenderingContext, COMPAT_instanced_arrays, COMPAT_standard_derivatives, COMPAT_vertex_array_object, getInstancedArrays, getStandardDerivatives, COMPAT_element_index_uint, getElementIndexUint, COMPAT_texture_float, getTextureFloat, COMPAT_texture_float_linear, getTextureFloatLinear, COMPAT_blend_minmax, getBlendMinMax, getFragDepth, COMPAT_frag_depth, COMPAT_color_buffer_float, getColorBufferFloat, COMPAT_draw_buffers, getDrawBuffers, getShaderTextureLod, COMPAT_shader_texture_lod, getDepthTexture, COMPAT_depth_texture, COMPAT_sRGB, getSRGB, getTextureHalfFloat, getTextureHalfFloatLinear, COMPAT_texture_half_float, COMPAT_texture_half_float_linear, COMPAT_color_buffer_half_float, getColorBufferHalfFloat, getVertexArrayObject, getDisjointTimerQuery, COMPAT_disjoint_timer_query, getNoNonInstancedActiveAttribs, getDrawBuffersIndexed, COMPAT_draw_buffers_indexed, getParallelShaderCompile, COMPAT_parallel_shader_compile, getFboRenderMipmap, COMPAT_fboRenderMipmap, COMPAT_provoking_vertex, getProvokingVertex } from './compat';
|
|
|
import { isDebugMode } from '../../mol-util/debug';
|
|
|
|
|
|
export type WebGLExtensions = {
|
|
@@ -29,6 +29,7 @@ export type WebGLExtensions = {
|
|
|
disjointTimerQuery: COMPAT_disjoint_timer_query | null
|
|
|
parallelShaderCompile: COMPAT_parallel_shader_compile | null
|
|
|
fboRenderMipmap: COMPAT_fboRenderMipmap | null
|
|
|
+ provokingVertex: COMPAT_provoking_vertex | null
|
|
|
|
|
|
noNonInstancedActiveAttribs: boolean
|
|
|
}
|
|
@@ -121,6 +122,10 @@ export function createExtensions(gl: GLRenderingContext): WebGLExtensions {
|
|
|
if (isDebugMode && fboRenderMipmap === null) {
|
|
|
console.log('Could not find support for "fbo_render_mipmap"');
|
|
|
}
|
|
|
+ const provokingVertex = getProvokingVertex(gl);
|
|
|
+ if (isDebugMode && provokingVertex === null) {
|
|
|
+ console.log('Could not find support for "provoking_vertex"');
|
|
|
+ }
|
|
|
|
|
|
const noNonInstancedActiveAttribs = getNoNonInstancedActiveAttribs(gl);
|
|
|
|
|
@@ -146,6 +151,7 @@ export function createExtensions(gl: GLRenderingContext): WebGLExtensions {
|
|
|
disjointTimerQuery,
|
|
|
parallelShaderCompile,
|
|
|
fboRenderMipmap,
|
|
|
+ provokingVertex,
|
|
|
|
|
|
noNonInstancedActiveAttribs,
|
|
|
};
|