|
@@ -439,8 +439,6 @@ function WebGLState( gl, extensions, capabilities ) {
|
|
|
|
|
|
function bindFramebuffer( target, framebuffer ) {
|
|
function bindFramebuffer( target, framebuffer ) {
|
|
|
|
|
|
- if ( target === gl.DRAW_FRAMEBUFFER ) target = gl.FRAMEBUFFER;
|
|
|
|
-
|
|
|
|
if ( framebuffer === null && xrFramebuffer !== null ) framebuffer = xrFramebuffer; // use active XR framebuffer if available
|
|
if ( framebuffer === null && xrFramebuffer !== null ) framebuffer = xrFramebuffer; // use active XR framebuffer if available
|
|
|
|
|
|
if ( currentBoundFramebuffers[ target ] !== framebuffer ) {
|
|
if ( currentBoundFramebuffers[ target ] !== framebuffer ) {
|
|
@@ -945,15 +943,13 @@ function WebGLState( gl, extensions, capabilities ) {
|
|
|
|
|
|
gl.activeTexture( gl.TEXTURE0 );
|
|
gl.activeTexture( gl.TEXTURE0 );
|
|
|
|
|
|
|
|
+ gl.bindFramebuffer( gl.FRAMEBUFFER, null );
|
|
|
|
+
|
|
if ( isWebGL2 === true ) {
|
|
if ( isWebGL2 === true ) {
|
|
|
|
|
|
- gl.bindFramebuffer( gl.DRAW_FRAMEBUFFER, null ); // Equivalent to gl.FRAMEBUFFER
|
|
|
|
|
|
+ gl.bindFramebuffer( gl.DRAW_FRAMEBUFFER, null );
|
|
gl.bindFramebuffer( gl.READ_FRAMEBUFFER, null );
|
|
gl.bindFramebuffer( gl.READ_FRAMEBUFFER, null );
|
|
|
|
|
|
- } else {
|
|
|
|
-
|
|
|
|
- gl.bindFramebuffer( gl.FRAMEBUFFER, null );
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
gl.useProgram( null );
|
|
gl.useProgram( null );
|