mirror of
https://github.com/photonstorm/phaser
synced 2024-11-17 10:18:42 +00:00
Tidying up
This commit is contained in:
parent
de7c804c47
commit
08f4a0ccf4
2 changed files with 1 additions and 43 deletions
|
@ -196,21 +196,7 @@ var BitmapMask = new Class({
|
|||
*/
|
||||
preRenderWebGL: function (renderer, maskedObject, camera)
|
||||
{
|
||||
// if (renderer.maskStack.length === 0)
|
||||
// {
|
||||
// renderer.maskCount = 0;
|
||||
// }
|
||||
|
||||
// if (renderer.currentCameraMask !== this)
|
||||
// {
|
||||
// renderer.currentMask = this;
|
||||
// }
|
||||
|
||||
// renderer.maskStack.push({ mask: this, camera: camera });
|
||||
|
||||
renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera);
|
||||
|
||||
// renderer.maskCount++;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -226,34 +212,6 @@ var BitmapMask = new Class({
|
|||
postRenderWebGL: function (renderer, camera)
|
||||
{
|
||||
renderer.pipelines.BitmapMaskPipeline.endMask(this, camera);
|
||||
|
||||
/*
|
||||
renderer.maskStack.pop();
|
||||
|
||||
renderer.maskCount--;
|
||||
|
||||
if (renderer.maskStack.length === 0)
|
||||
{
|
||||
renderer.pipelines.BitmapMaskPipeline.endMask(this);
|
||||
|
||||
renderer.currentMask = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Get the mask previous to this one
|
||||
var prev = renderer.maskStack[renderer.maskStack.length - 1];
|
||||
var bitmapMask = prev.mask;
|
||||
|
||||
// var camera = prev.camera;
|
||||
|
||||
if (renderer.currentCameraMask !== bitmapMask)
|
||||
{
|
||||
renderer.currentMask = bitmapMask;
|
||||
}
|
||||
|
||||
renderer.setFramebuffer(bitmapMask.mainFramebuffer);
|
||||
}
|
||||
*/
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -241,7 +241,7 @@ var BitmapMaskPipeline = new Class({
|
|||
renderer.setTexture2D(mask.mainTexture, 0);
|
||||
renderer.setInt1(this.program, 'uInvertMaskAlpha', mask.invertAlpha);
|
||||
|
||||
// Finally draw a triangle filling the whole screen
|
||||
// Finally, draw a triangle filling the whole screen
|
||||
gl.drawArrays(this.topology, 0, 3);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue