diff --git a/src/gameobjects/image/ImageWebGLRenderer.js b/src/gameobjects/image/ImageWebGLRenderer.js index 4ffbcedec..516c8f36c 100644 --- a/src/gameobjects/image/ImageWebGLRenderer.js +++ b/src/gameobjects/image/ImageWebGLRenderer.js @@ -24,7 +24,7 @@ Phaser.Renderer.WebGL.GameObjects.Image = { var tint = src.color._glTint; var bg = src.color._glBg; - renderer.spriteBatch.addToBatch(src, verts, uvs, index, alpha, tint, bg); + renderer.batch.add(src, verts, uvs, index, alpha, tint, bg); /* diff --git a/src/gameobjects/sprite/SpriteWebGLRenderer.js b/src/gameobjects/sprite/SpriteWebGLRenderer.js index 8967fe901..6dacafb85 100644 --- a/src/gameobjects/sprite/SpriteWebGLRenderer.js +++ b/src/gameobjects/sprite/SpriteWebGLRenderer.js @@ -20,7 +20,7 @@ Phaser.Renderer.WebGL.GameObjects.Sprite = { // Would be good to get this down to 1 check, or even none. if (src._mask || src._filters) { - var spriteBatch = renderer.spriteBatch; + var spriteBatch = renderer.batch; // push filter first as we need to ensure the stencil buffer is correct for any masking if (src._filters) diff --git a/src/renderer/webgl/BatchManager.js b/src/renderer/webgl/BatchManager.js index 09ac820e3..c13e753ea 100644 --- a/src/renderer/webgl/BatchManager.js +++ b/src/renderer/webgl/BatchManager.js @@ -366,7 +366,7 @@ Phaser.Renderer.WebGL.BatchManager.prototype = { } }, - addToBatch: function (gameObject, verts, uvs, textureIndex, alpha, tintColors, bgColors) + add: function (gameObject, verts, uvs, textureIndex, alpha, tintColors, bgColors) { // console.log('addToBatch', gameObject.frame.name); diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 3b1a9e10f..158ce0010 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -140,10 +140,10 @@ Phaser.Renderer.WebGL = function (game) /** * Manages the rendering of sprites - * @property spriteBatch + * @property batch * @type WebGLSpriteBatch */ - this.spriteBatch = new Phaser.Renderer.WebGL.BatchManager(this, 2000); + this.batch = new Phaser.Renderer.WebGL.BatchManager(this, 2000); /** * Manages the filters @@ -234,7 +234,7 @@ Phaser.Renderer.WebGL.prototype = { gl.enable(gl.BLEND); this.shaderManager.init(); - this.spriteBatch.init(); + this.batch.init(); this.filterManager.init(); this.stencilManager.init(); @@ -453,7 +453,7 @@ Phaser.Renderer.WebGL.prototype = { // console.log('render'); - this.spriteBatch.begin(); + this.batch.begin(); // this.filterManager.begin(); @@ -461,7 +461,7 @@ Phaser.Renderer.WebGL.prototype = { stage.render(this, stage); - this.spriteBatch.end(); + this.batch.end(); // debugger; @@ -775,12 +775,12 @@ Phaser.Renderer.WebGL.prototype = { this.offset = null; this.shaderManager.destroy(); - this.spriteBatch.destroy(); + this.batch.destroy(); this.maskManager.destroy(); this.filterManager.destroy(); this.shaderManager = null; - this.spriteBatch = null; + this.batch = null; this.maskManager = null; this.filterManager = null;