|
@@ -4,7 +4,7 @@
|
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
* @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, COMPAT_provoking_vertex, getProvokingVertex, COMPAT_clip_cull_distance, getClipCullDistance } 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, COMPAT_clip_cull_distance, getClipCullDistance, COMPAT_conservative_depth, getConservativeDepth, COMPAT_stencil_texturing, getStencilTexturing, COMPAT_clip_control, getClipControl } from './compat';
|
|
import { isDebugMode } from '../../mol-util/debug';
|
|
import { isDebugMode } from '../../mol-util/debug';
|
|
|
|
|
|
export type WebGLExtensions = {
|
|
export type WebGLExtensions = {
|
|
@@ -31,6 +31,9 @@ export type WebGLExtensions = {
|
|
fboRenderMipmap: COMPAT_fboRenderMipmap | null
|
|
fboRenderMipmap: COMPAT_fboRenderMipmap | null
|
|
provokingVertex: COMPAT_provoking_vertex | null
|
|
provokingVertex: COMPAT_provoking_vertex | null
|
|
clipCullDistance: COMPAT_clip_cull_distance | null
|
|
clipCullDistance: COMPAT_clip_cull_distance | null
|
|
|
|
+ conservativeDepth: COMPAT_conservative_depth | null
|
|
|
|
+ stencilTexturing: COMPAT_stencil_texturing | null
|
|
|
|
+ clipControl: COMPAT_clip_control | null
|
|
|
|
|
|
noNonInstancedActiveAttribs: boolean
|
|
noNonInstancedActiveAttribs: boolean
|
|
}
|
|
}
|
|
@@ -131,6 +134,18 @@ export function createExtensions(gl: GLRenderingContext): WebGLExtensions {
|
|
if (isDebugMode && clipCullDistance === null) {
|
|
if (isDebugMode && clipCullDistance === null) {
|
|
console.log('Could not find support for "clip_cull_distance"');
|
|
console.log('Could not find support for "clip_cull_distance"');
|
|
}
|
|
}
|
|
|
|
+ const conservativeDepth = getConservativeDepth(gl);
|
|
|
|
+ if (isDebugMode && conservativeDepth === null) {
|
|
|
|
+ console.log('Could not find support for "conservative_depth"');
|
|
|
|
+ }
|
|
|
|
+ const stencilTexturing = getStencilTexturing(gl);
|
|
|
|
+ if (isDebugMode && stencilTexturing === null) {
|
|
|
|
+ console.log('Could not find support for "stencil_texturing"');
|
|
|
|
+ }
|
|
|
|
+ const clipControl = getClipControl(gl);
|
|
|
|
+ if (isDebugMode && clipControl === null) {
|
|
|
|
+ console.log('Could not find support for "clipControl"');
|
|
|
|
+ }
|
|
|
|
|
|
const noNonInstancedActiveAttribs = getNoNonInstancedActiveAttribs(gl);
|
|
const noNonInstancedActiveAttribs = getNoNonInstancedActiveAttribs(gl);
|
|
|
|
|
|
@@ -158,6 +173,9 @@ export function createExtensions(gl: GLRenderingContext): WebGLExtensions {
|
|
fboRenderMipmap,
|
|
fboRenderMipmap,
|
|
provokingVertex,
|
|
provokingVertex,
|
|
clipCullDistance,
|
|
clipCullDistance,
|
|
|
|
+ conservativeDepth,
|
|
|
|
+ stencilTexturing,
|
|
|
|
+ clipControl,
|
|
|
|
|
|
noNonInstancedActiveAttribs,
|
|
noNonInstancedActiveAttribs,
|
|
};
|
|
};
|