mrdoob 6 месяцев назад
Родитель
Сommit
7ee24a265e

+ 0 - 1
src/renderers/webgl-fallback/utils/WebGLConstants.js

@@ -5,7 +5,6 @@ export const GLFeatureName = {
 	'WEBGL_compressed_texture_etc': 'texture-compression-etc2',
 	'WEBGL_compressed_texture_etc1': 'texture-compression-etc1',
 	'WEBGL_compressed_texture_pvrtc': 'texture-compression-pvrtc',
-	'WEBKIT_WEBGL_compressed_texture_pvrtc': 'texture-compression-pvrtc',
 	'WEBGL_compressed_texture_s3tc': 'texture-compression-s3tc',
 	'EXT_texture_compression_bptc': 'texture-compression-bc',
 	'EXT_disjoint_timer_query_webgl2': 'timestamp-query',

+ 1 - 24
src/renderers/webgl/WebGLExtensions.js

@@ -12,30 +12,7 @@ function WebGLExtensions( gl ) {
 
 		}
 
-		let extension;
-
-		switch ( name ) {
-
-			case 'WEBGL_depth_texture':
-				extension = gl.getExtension( 'WEBGL_depth_texture' ) || gl.getExtension( 'MOZ_WEBGL_depth_texture' ) || gl.getExtension( 'WEBKIT_WEBGL_depth_texture' );
-				break;
-
-			case 'EXT_texture_filter_anisotropic':
-				extension = gl.getExtension( 'EXT_texture_filter_anisotropic' ) || gl.getExtension( 'MOZ_EXT_texture_filter_anisotropic' ) || gl.getExtension( 'WEBKIT_EXT_texture_filter_anisotropic' );
-				break;
-
-			case 'WEBGL_compressed_texture_s3tc':
-				extension = gl.getExtension( 'WEBGL_compressed_texture_s3tc' ) || gl.getExtension( 'MOZ_WEBGL_compressed_texture_s3tc' ) || gl.getExtension( 'WEBKIT_WEBGL_compressed_texture_s3tc' );
-				break;
-
-			case 'WEBGL_compressed_texture_pvrtc':
-				extension = gl.getExtension( 'WEBGL_compressed_texture_pvrtc' ) || gl.getExtension( 'WEBKIT_WEBGL_compressed_texture_pvrtc' );
-				break;
-
-			default:
-				extension = gl.getExtension( name );
-
-		}
+		const extension = gl.getExtension( name );
 
 		extensions[ name ] = extension;
 

+ 0 - 29
test/unit/src/renderers/webgl/WebGLExtensions.tests.js

@@ -49,17 +49,6 @@ export default QUnit.module( 'Renderers', () => {
 
 			} );
 
-			QUnit.test( 'has (with aliases)', ( assert ) => {
-
-				const gl = new WebglContextMock( [ 'WEBKIT_WEBGL_depth_texture' ] );
-				const extensions = new WebGLExtensions( gl );
-				assert.ok( extensions.has( 'WEBGL_depth_texture' ) );
-				assert.ok( extensions.has( 'WEBKIT_WEBGL_depth_texture' ) );
-				assert.notOk( extensions.has( 'EXT_texture_filter_anisotropic' ) );
-				assert.notOk( extensions.has( 'NonExistingExtension' ) );
-
-			} );
-
 			QUnit.test( 'get', ( assert ) => {
 
 				const gl = new WebglContextMock( [ 'Extension1', 'Extension2' ] );
@@ -77,24 +66,6 @@ export default QUnit.module( 'Renderers', () => {
 
 			} );
 
-			QUnit.test( 'get (with aliases)', ( assert ) => {
-
-				const gl = new WebglContextMock( [ 'WEBKIT_WEBGL_depth_texture' ] );
-				const extensions = new WebGLExtensions( gl );
-				assert.ok( extensions.get( 'WEBGL_depth_texture' ) );
-				assert.ok( extensions.get( 'WEBKIT_WEBGL_depth_texture' ) );
-
-				// suppress the following console message when testing
-				// THREE.WebGLRenderer: EXT_texture_filter_anisotropic extension not supported.
-				// THREE.WebGLRenderer: NonExistingExtension extension not supported.
-
-				console.level = CONSOLE_LEVEL.OFF;
-				assert.notOk( extensions.get( 'EXT_texture_filter_anisotropic' ) );
-				assert.notOk( extensions.get( 'NonExistingExtension' ) );
-				console.level = CONSOLE_LEVEL.DEFAULT;
-
-			} );
-
 		} );
 
 	} );

粤ICP备19079148号