|
@@ -230,6 +230,20 @@ class WebGLBackend extends Backend {
|
|
|
const renderContextData = this.get( renderContext );
|
|
const renderContextData = this.get( renderContext );
|
|
|
const previousContext = renderContextData.previousContext;
|
|
const previousContext = renderContextData.previousContext;
|
|
|
|
|
|
|
|
|
|
+ const occlusionQueryCount = renderContext.occlusionQueryCount;
|
|
|
|
|
+
|
|
|
|
|
+ if ( occlusionQueryCount > 0 ) {
|
|
|
|
|
+
|
|
|
|
|
+ if ( occlusionQueryCount > renderContextData.occlusionQueryIndex ) {
|
|
|
|
|
+
|
|
|
|
|
+ gl.endQuery( gl.ANY_SAMPLES_PASSED );
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.resolveOccludedAsync( renderContext );
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
const textures = renderContext.textures;
|
|
const textures = renderContext.textures;
|
|
|
|
|
|
|
|
if ( textures !== null ) {
|
|
if ( textures !== null ) {
|
|
@@ -250,7 +264,6 @@ class WebGLBackend extends Backend {
|
|
|
|
|
|
|
|
this._currentContext = previousContext;
|
|
this._currentContext = previousContext;
|
|
|
|
|
|
|
|
-
|
|
|
|
|
if ( renderContext.textures !== null && renderContext.renderTarget ) {
|
|
if ( renderContext.textures !== null && renderContext.renderTarget ) {
|
|
|
|
|
|
|
|
const renderTargetContextData = this.get( renderContext.renderTarget );
|
|
const renderTargetContextData = this.get( renderContext.renderTarget );
|
|
@@ -288,7 +301,6 @@ class WebGLBackend extends Backend {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -306,32 +318,12 @@ class WebGLBackend extends Backend {
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
|
|
|
|
|
- const gl = this.gl;
|
|
|
|
|
-
|
|
|
|
|
gl.viewport( 0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight );
|
|
gl.viewport( 0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight );
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const occlusionQueryCount = renderContext.occlusionQueryCount;
|
|
|
|
|
-
|
|
|
|
|
- if ( occlusionQueryCount > 0 ) {
|
|
|
|
|
-
|
|
|
|
|
- const renderContextData = this.get( renderContext );
|
|
|
|
|
-
|
|
|
|
|
- if ( occlusionQueryCount > renderContextData.occlusionQueryIndex ) {
|
|
|
|
|
-
|
|
|
|
|
- const { gl } = this;
|
|
|
|
|
-
|
|
|
|
|
- gl.endQuery( gl.ANY_SAMPLES_PASSED );
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- this.resolveOccludedAsync( renderContext );
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
this.prepareTimestampBuffer( renderContext );
|
|
this.prepareTimestampBuffer( renderContext );
|
|
|
|
|
|
|
|
}
|
|
}
|