Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/renderers/WebGLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ class WebGLRenderer {
let _isContextLost = false;
let _nodesHandler = null;

let _scratchFramebuffer = null;
let _srcFramebuffer = null;
let _dstFramebuffer = null;

// internal state cache

this._outputColorSpace = SRGBColorSpace;
Expand Down Expand Up @@ -438,6 +442,10 @@ class WebGLRenderer {

}

_scratchFramebuffer = _gl.createFramebuffer();
_srcFramebuffer = _gl.createFramebuffer();
_dstFramebuffer = _gl.createFramebuffer();

info = new WebGLInfo( _gl );
properties = new WebGLProperties();
textures = new WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info );
Expand Down Expand Up @@ -2870,8 +2878,6 @@ class WebGLRenderer {

};

const _scratchFrameBuffer = _gl.createFramebuffer();

/**
* Sets the active rendertarget.
*
Expand Down Expand Up @@ -3004,7 +3010,7 @@ class WebGLRenderer {
// being bound that are different sizes.
if ( activeMipmapLevel !== 0 ) {

framebuffer = _scratchFrameBuffer;
framebuffer = _scratchFramebuffer;

}

Expand Down Expand Up @@ -3247,8 +3253,6 @@ class WebGLRenderer {

};

const _srcFramebuffer = _gl.createFramebuffer();
const _dstFramebuffer = _gl.createFramebuffer();

/**
* Copies data of the given source texture into a destination texture.
Expand Down