|
@@ -21366,10 +21366,22 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
render: _infoRender,
|
|
|
memory: _infoMemory,
|
|
|
- programs: null
|
|
|
+ programs: null,
|
|
|
+ autoReset: true,
|
|
|
+ reset: resetInfo
|
|
|
|
|
|
};
|
|
|
|
|
|
+ function resetInfo () {
|
|
|
+
|
|
|
+ _infoRender.frame ++;
|
|
|
+ _infoRender.calls = 0;
|
|
|
+ _infoRender.vertices = 0;
|
|
|
+ _infoRender.faces = 0;
|
|
|
+ _infoRender.points = 0;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
function getTargetPixelRatio() {
|
|
|
|
|
|
return _currentRenderTarget === null ? _pixelRatio : 1;
|
|
@@ -22332,11 +22344,7 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
//
|
|
|
|
|
|
- _infoRender.frame ++;
|
|
|
- _infoRender.calls = 0;
|
|
|
- _infoRender.vertices = 0;
|
|
|
- _infoRender.faces = 0;
|
|
|
- _infoRender.points = 0;
|
|
|
+ if ( this.info.autoReset ) this.info.reset();
|
|
|
|
|
|
if ( renderTarget === undefined ) {
|
|
|
|
|
@@ -23749,6 +23757,18 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
};
|
|
|
|
|
|
+ this.copyFramebufferToTexture = function ( x, y, texture, level ) {
|
|
|
+
|
|
|
+ var width = texture.image.width;
|
|
|
+ var height = texture.image.height;
|
|
|
+ var internalFormat = utils.convert( texture.format );
|
|
|
+
|
|
|
+ this.setTexture2D( texture, 0 );
|
|
|
+
|
|
|
+ _gl.copyTexImage2D( _gl.TEXTURE_2D, level || 0, internalFormat, x, y, width, height, 0 );
|
|
|
+
|
|
|
+ };
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|