2
0
Эх сурвалжийг харах

Revert "WebGLInfo: Clean up."

This reverts commit 481ac66c9a417dc115eb06e6a6f4947b0b8ed923.
Mr.doob 5 жил өмнө
parent
commit
492059d87b

+ 1 - 1
src/renderers/WebGLRenderer.js

@@ -278,7 +278,7 @@ function WebGLRenderer( parameters ) {
 		state.scissor( _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).floor() );
 		state.scissor( _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).floor() );
 		state.viewport( _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).floor() );
 		state.viewport( _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).floor() );
 
 
-		info = new WebGLInfo();
+		info = new WebGLInfo( _gl );
 		properties = new WebGLProperties();
 		properties = new WebGLProperties();
 		textures = new WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info );
 		textures = new WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info );
 		attributes = new WebGLAttributes( _gl );
 		attributes = new WebGLAttributes( _gl );

+ 1 - 1
src/renderers/webgl/WebGLInfo.d.ts

@@ -5,7 +5,7 @@ import { WebGLProgram } from './WebGLProgram';
  */
  */
 export class WebGLInfo {
 export class WebGLInfo {
 
 
-	constructor();
+	constructor( gl: WebGLRenderingContext );
 
 
 	autoReset: boolean;
 	autoReset: boolean;
 	memory: {
 	memory: {

+ 1 - 1
src/renderers/webgl/WebGLInfo.js

@@ -2,7 +2,7 @@
  * @author Mugen87 / https://github.com/Mugen87
  * @author Mugen87 / https://github.com/Mugen87
  */
  */
 
 
-function WebGLInfo() {
+function WebGLInfo( gl ) {
 
 
 	var memory = {
 	var memory = {
 		geometries: 0,
 		geometries: 0,