mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 22:52:14 +00:00
Fixed clearing render target issue
This commit is contained in:
parent
b1b184aed4
commit
0370ebf15e
1 changed files with 2 additions and 1 deletions
|
@ -247,6 +247,7 @@ WebGLRenderer.prototype = {
|
|||
// Call at the start of the render loop
|
||||
preRender: function ()
|
||||
{
|
||||
this.setRenderTarget(null);
|
||||
// No point rendering if our context has been blown up!
|
||||
if (this.contextLost)
|
||||
{
|
||||
|
@ -279,8 +280,8 @@ WebGLRenderer.prototype = {
|
|||
// Could move to the State Systems or MainLoop
|
||||
var gl = this.gl;
|
||||
var scissor = (camera.x !== 0 || camera.y !== 0 || camera.width !== gl.canvas.width || camera.height !== gl.canvas.height);
|
||||
this.setRenderTarget(null);
|
||||
|
||||
this.setRenderTarget(null);
|
||||
if (scissor)
|
||||
{
|
||||
gl.enable(gl.SCISSOR_TEST);
|
||||
|
|
Loading…
Reference in a new issue