mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 05:33:35 +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
|
||||
* counter and sets texture unit 1 as being active.
|
||||
*
|
||||
|
@ -1501,20 +1501,17 @@ var WebGLRenderer = new Class({
|
|||
var gl = this.gl;
|
||||
var temp = this.tempTextures;
|
||||
|
||||
for (var i = 0; i < temp.length; i++)
|
||||
{
|
||||
gl.activeTexture(gl.TEXTURE0 + i);
|
||||
gl.activeTexture(gl.TEXTURE0);
|
||||
gl.bindTexture(gl.TEXTURE_2D, temp[0]);
|
||||
|
||||
gl.bindTexture(gl.TEXTURE_2D, temp[i]);
|
||||
}
|
||||
gl.activeTexture(gl.TEXTURE1);
|
||||
gl.bindTexture(gl.TEXTURE_2D, temp[1]);
|
||||
|
||||
this.normalTexture = null;
|
||||
this.textureZero = null;
|
||||
|
||||
this.currentActiveTexture = 1;
|
||||
this.startActiveTexture++;
|
||||
|
||||
gl.activeTexture(gl.TEXTURE1);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue