mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
Added flush argument
This commit is contained in:
parent
d9f89fbde1
commit
5683713253
1 changed files with 7 additions and 2 deletions
|
@ -1140,13 +1140,18 @@ var WebGLRenderer = new Class({
|
|||
*
|
||||
* @return {this} This WebGLRenderer instance.
|
||||
*/
|
||||
setTexture2D: function (texture, textureUnit)
|
||||
setTexture2D: function (texture, textureUnit, flush)
|
||||
{
|
||||
if (flush === undefined) { flush = true; }
|
||||
|
||||
var gl = this.gl;
|
||||
|
||||
if (texture !== this.currentTextures[textureUnit])
|
||||
{
|
||||
this.flush();
|
||||
if (flush)
|
||||
{
|
||||
this.flush();
|
||||
}
|
||||
|
||||
if (this.currentActiveTextureUnit !== textureUnit)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue