Skip to content

Commit 0370ebf

Browse files
committed
Fixed clearing render target issue
1 parent b1b184a commit 0370ebf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

v3/src/renderer/webgl/WebGLRenderer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ WebGLRenderer.prototype = {
247247
// Call at the start of the render loop
248248
preRender: function ()
249249
{
250+
this.setRenderTarget(null);
250251
// No point rendering if our context has been blown up!
251252
if (this.contextLost)
252253
{
@@ -279,8 +280,8 @@ WebGLRenderer.prototype = {
279280
// Could move to the State Systems or MainLoop
280281
var gl = this.gl;
281282
var scissor = (camera.x !== 0 || camera.y !== 0 || camera.width !== gl.canvas.width || camera.height !== gl.canvas.height);
282-
this.setRenderTarget(null);
283283

284+
this.setRenderTarget(null);
284285
if (scissor)
285286
{
286287
gl.enable(gl.SCISSOR_TEST);

0 commit comments

Comments
 (0)