Fixed Multi Texture support across split texture atlases.

This commit is contained in:
Richard Davey 2016-10-25 01:54:49 +01:00
parent 8ab7dc80dc
commit dae0b2c124
2 changed files with 5 additions and 5 deletions

View file

@ -291,7 +291,7 @@ Phaser.Renderer.WebGL.BatchManager.prototype = {
var tempTexture = this.renderer.createEmptyTexture(1, 1, 0);
for (i = 0; i < this.maxTextures; i++)
for (i = 0; i < this.renderer.maxTextures; i++)
{
gl.activeTexture(gl.TEXTURE0 + i);
@ -304,7 +304,7 @@ Phaser.Renderer.WebGL.BatchManager.prototype = {
gl.activeTexture(gl.TEXTURE0);
gl.uniform1iv(this.uSamplerArray, indices);
gl.uniform1iv(this.uSampler, indices);
}
else
{
@ -360,7 +360,7 @@ Phaser.Renderer.WebGL.BatchManager.prototype = {
{
if (this.renderer.textureArray[textureSource.glTextureIndex] !== textureSource)
{
console.log('setCurrentTexture - batch size', this.currentBatchSize);
// console.log('setCurrentTexture - batch size', this.currentBatchSize);
// console.log(textureSource);
if (this.currentBatchSize > 0)
@ -370,7 +370,7 @@ Phaser.Renderer.WebGL.BatchManager.prototype = {
gl.activeTexture(gl.TEXTURE0 + textureSource.glTextureIndex);
console.log('activeTexture', gl.TEXTURE0 + textureSource.glTextureIndex);
// console.log('activeTexture', gl.TEXTURE0 + textureSource.glTextureIndex);
gl.bindTexture(gl.TEXTURE_2D, textureSource.glTexture);

View file

@ -86,7 +86,7 @@ Phaser.Renderer.WebGL = function (game)
*/
this.stencilBufferLimit = 6;
this.multiTexture = false;
this.multiTexture = true;
this.extensions = {};