mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 05:58:30 +00:00
Reset just units 0 and 1
This commit is contained in:
parent
d7cf9da819
commit
3b9d115d0c
1 changed files with 5 additions and 8 deletions
|
@ -1487,7 +1487,7 @@ var WebGLRenderer = new Class({
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flushes the current pipeline, then resets all of the textures
|
* Flushes the current pipeline, then resets the first two textures
|
||||||
* back to the default temporary textures, resets the start active
|
* back to the default temporary textures, resets the start active
|
||||||
* counter and sets texture unit 1 as being active.
|
* counter and sets texture unit 1 as being active.
|
||||||
*
|
*
|
||||||
|
@ -1501,20 +1501,17 @@ var WebGLRenderer = new Class({
|
||||||
var gl = this.gl;
|
var gl = this.gl;
|
||||||
var temp = this.tempTextures;
|
var temp = this.tempTextures;
|
||||||
|
|
||||||
for (var i = 0; i < temp.length; i++)
|
gl.activeTexture(gl.TEXTURE0);
|
||||||
{
|
gl.bindTexture(gl.TEXTURE_2D, temp[0]);
|
||||||
gl.activeTexture(gl.TEXTURE0 + i);
|
|
||||||
|
|
||||||
gl.bindTexture(gl.TEXTURE_2D, temp[i]);
|
gl.activeTexture(gl.TEXTURE1);
|
||||||
}
|
gl.bindTexture(gl.TEXTURE_2D, temp[1]);
|
||||||
|
|
||||||
this.normalTexture = null;
|
this.normalTexture = null;
|
||||||
this.textureZero = null;
|
this.textureZero = null;
|
||||||
|
|
||||||
this.currentActiveTexture = 1;
|
this.currentActiveTexture = 1;
|
||||||
this.startActiveTexture++;
|
this.startActiveTexture++;
|
||||||
|
|
||||||
gl.activeTexture(gl.TEXTURE1);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue