mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
Fixed Multi Texture support across split texture atlases.
This commit is contained in:
parent
8ab7dc80dc
commit
dae0b2c124
2 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ Phaser.Renderer.WebGL = function (game)
|
|||
*/
|
||||
this.stencilBufferLimit = 6;
|
||||
|
||||
this.multiTexture = false;
|
||||
this.multiTexture = true;
|
||||
|
||||
this.extensions = {};
|
||||
|
||||
|
|
Loading…
Reference in a new issue