فهرست منبع

Examples: Avoid usage of raw WebGL context

Mugen87 6 سال پیش
والد
کامیت
206ba2e3b1
1فایلهای تغییر یافته به همراه2 افزوده شده و 4 حذف شده
  1. 2 4
      examples/webgl_lights_rectarealight.html

+ 2 - 4
examples/webgl_lights_rectarealight.html

@@ -77,19 +77,17 @@
 				renderer.gammaOutput = true;
 				document.body.appendChild( renderer.domElement );
 
-				var gl = renderer.context;
-
 				// Check for float-RT support
 				// TODO (abelnation): figure out fall-back for float textures
 
-				if ( ! gl.getExtension( 'OES_texture_float' ) ) {
+				if ( ! renderer.extensions.get( 'OES_texture_float' ) ) {
 
 					alert( 'OES_texture_float not supported' );
 					throw 'missing webgl extension';
 
 				}
 
-				if ( ! gl.getExtension( 'OES_texture_float_linear' ) ) {
+				if ( ! renderer.extensions.get( 'OES_texture_float_linear' ) ) {
 
 					alert( 'OES_texture_float_linear not supported' );
 					throw 'missing webgl extension';