Fix when rendering more than the buffer limit

This commit is contained in:
Felipe Alfonso 2017-08-14 23:36:41 -03:00
parent a536403cc7
commit 8fd14688b6
3 changed files with 5 additions and 3 deletions

View file

@ -1,4 +1,4 @@
var CHECKSUM = {
build: 'eb7dc200-8100-11e7-b353-1b576d4fdd2c'
build: '37876e10-8162-11e7-b191-e9a855a11647'
};
module.exports = CHECKSUM;

View file

@ -97,7 +97,8 @@ var DeferredRenderer = function (renderer, lightLayer, interpolationPercentage,
if (renderer.currentTexture[0] !== frame.texture.source[frame.sourceIndex].glTexture ||
renderer.currentTexture[1] !== spriteNormalPair.normalTextureRef.source[spriteNormalPair.spriteRef.frame.sourceIndex].glTexture)
renderer.currentTexture[1] !== spriteNormalPair.normalTextureRef.source[spriteNormalPair.spriteRef.frame.sourceIndex].glTexture ||
batch.shouldFlush())
{
batch.flush(lightLayer.gBufferShaderPass, lightLayer.renderTarget);
renderer.setTexture(frame.texture.source[frame.sourceIndex].glTexture, 0);

View file

@ -93,7 +93,8 @@ var ForwardRenderer = function (renderer, lightLayer, interpolationPercentage, c
if (renderer.currentTexture[0] !== frame.texture.source[frame.sourceIndex].glTexture ||
renderer.currentTexture[1] !== spriteNormalPair.normalTextureRef.source[spriteNormalPair.spriteRef.frame.sourceIndex].glTexture)
renderer.currentTexture[1] !== spriteNormalPair.normalTextureRef.source[spriteNormalPair.spriteRef.frame.sourceIndex].glTexture ||
batch.shouldFlush())
{
batch.flush(lightLayer.passShader, lightLayer.renderTarget);
renderer.setTexture(frame.texture.source[frame.sourceIndex].glTexture, 0);