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
17 changes: 14 additions & 3 deletions src/renderers/common/Renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,7 @@ class Renderer {
const previousRenderId = nodeFrame.renderId;
const previousRenderContext = this._currentRenderContext;
const previousRenderObjectFunction = this._currentRenderObjectFunction;
const previousHandleObjectFunction = this._handleObjectFunction;
const previousCompilationPromises = this._compilationPromises;

//
Expand Down Expand Up @@ -930,7 +931,15 @@ class Renderer {

//

this._background.update( sceneRef, renderList, renderContext );
if ( targetScene !== scene ) {

this._background.update( targetScene, renderList, renderContext );

} else {

this._background.update( sceneRef, renderList, renderContext );

}

// process render lists

Expand All @@ -948,10 +957,9 @@ class Renderer {

this._currentRenderContext = previousRenderContext;
this._currentRenderObjectFunction = previousRenderObjectFunction;
this._handleObjectFunction = previousHandleObjectFunction;
this._compilationPromises = previousCompilationPromises;

this._handleObjectFunction = this._renderObjectDirect;

// wait for all promises setup by backends awaiting compilation/linking/pipeline creation to complete

await Promise.all( compilationPromises );
Expand Down Expand Up @@ -1348,6 +1356,7 @@ class Renderer {
const previousRenderId = nodeFrame.renderId;
const previousRenderContext = this._currentRenderContext;
const previousRenderObjectFunction = this._currentRenderObjectFunction;
const previousHandleObjectFunction = this._handleObjectFunction;

//

Expand Down Expand Up @@ -1380,6 +1389,7 @@ class Renderer {

this._currentRenderContext = renderContext;
this._currentRenderObjectFunction = this._renderObjectFunction || this.renderObject;
this._handleObjectFunction = this._renderObjectDirect;

//

Expand Down Expand Up @@ -1579,6 +1589,7 @@ class Renderer {

this._currentRenderContext = previousRenderContext;
this._currentRenderObjectFunction = previousRenderObjectFunction;
this._handleObjectFunction = previousHandleObjectFunction;

//

Expand Down