Skip to content

Commit bd80999

Browse files
committed
Refined the Image and WebGL Renderers.
1 parent a55df3f commit bd80999

3 files changed

Lines changed: 2 additions & 31 deletions

File tree

src/gameobjects/image/ImageWebGLRenderer.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ Phaser.Renderer.WebGL.GameObjects.Image = {
2424
var tint = src.color._glTint;
2525
var bg = src.color._glBg;
2626

27-
renderer.batch.add(null, frame.source);
28-
renderer.batch.imageBatch.add(verts, uvs, index, alpha, tint, bg);
27+
renderer.batch.add(frame.source, src.blendMode, verts, uvs, index, alpha, tint, bg);
2928

3029
/*
3130

src/renderer/webgl/WebGLRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ Phaser.Renderer.WebGL.prototype = {
282282
this.multiTexture = true;
283283

284284
// Recompile the batch
285-
this.batch.initMultiTexture();
285+
// this.batch.initMultiTexture();
286286

287287
if (Array.isArray(textureArray))
288288
{

src/renderer/webgl/batches/ImageBatch.js

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -256,34 +256,6 @@ Phaser.Renderer.WebGL.Batch.Image.prototype.bindShader = function ()
256256

257257
Phaser.Renderer.WebGL.Batch.Image.prototype.add = function (verts, uvs, textureIndex, alpha, tintColors, bgColors)
258258
{
259-
// console.log('addToBatch', gameObject.frame.name);
260-
261-
/*
262-
263-
// Check Batch Size and flush if needed
264-
if (this.size >= this.maxSize)
265-
{
266-
this.flush();
267-
}
268-
269-
var source = gameObject.frame.source;
270-
271-
source.glLastUsed = this.renderer.startTime;
272-
273-
// Does this Game Objects texture need updating?
274-
if (source.glDirty)
275-
{
276-
this.renderer.updateTexture(source);
277-
}
278-
279-
// Does the batch need to activate a new texture?
280-
if (this.renderer.textureArray[source.glTextureIndex] !== source)
281-
{
282-
this.setCurrentTexture(source);
283-
}
284-
285-
*/
286-
287259
// These are TypedArray Views into the vertices ArrayBuffer
288260
var colors = this.colors;
289261
var positions = this.positions;

0 commit comments

Comments
 (0)