Skip to content

Commit 8bb9b13

Browse files
committed
SpriteBatch pipeline re-implementation
1 parent 3282ead commit 8bb9b13

4 files changed

Lines changed: 1046 additions & 847 deletions

File tree

src/gameobjects/sprite/SpriteWebGLRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var SpriteWebGLRenderer = function (renderer, src, interpolationPercentage, came
77
return;
88
}
99

10-
renderer.spriteBatch.addSprite(src, camera);
10+
renderer.spriteBatch.drawSprite(src, camera);
1111
};
1212

1313
module.exports = SpriteWebGLRenderer;

src/renderer/webgl/WebGLRenderer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,14 @@ var WebGLpipeline = new Class({
166166
this.extensions = gl.getSupportedExtensions();
167167
this.blitterBatch = this.addPipeline(new BlitterBatch(this.game, gl, this));
168168
//this.quadBatch = this.addPipeline(new QuadBatch(this.game, gl, this));
169-
//this.spriteBatch = this.addPipeline(new SpriteBatch(this.game, gl, this));
169+
this.spriteBatch = this.addPipeline(new SpriteBatch(this.game, gl, this));
170170
//this.shapeBatch = this.addPipeline(new ShapeBatch(this.game, gl, this));
171171
//this.EffectRenderer = this.addPipeline(new EffectRenderer(this.game, gl, this));
172172
//this.tileBatch = this.addPipeline(new TileBatch(this.game, gl, this));
173173
//this.TilemapRenderer = this.addPipeline(new TilemapRenderer(this.game, gl, this));
174174
//this.ParticleRenderer = this.addPipeline(new ParticleRenderer(this.game, gl, this));
175175
//this.MaskRenderer = this.addPipeline(new MaskRenderer(this.game, gl, this));
176-
this.currentPipeline = this.blitterBatch;
176+
this.currentPipeline = this.spriteBatch;
177177
this.currentVertexBuffer = null;
178178
this.setBlendMode(0);
179179
this.resize(this.width, this.height);

0 commit comments

Comments
 (0)