Skip to content

Commit 5683713

Browse files
committed
Added flush argument
1 parent d9f89fb commit 5683713

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/renderer/webgl/WebGLRenderer.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,13 +1140,18 @@ var WebGLRenderer = new Class({
11401140
*
11411141
* @return {this} This WebGLRenderer instance.
11421142
*/
1143-
setTexture2D: function (texture, textureUnit)
1143+
setTexture2D: function (texture, textureUnit, flush)
11441144
{
1145+
if (flush === undefined) { flush = true; }
1146+
11451147
var gl = this.gl;
11461148

11471149
if (texture !== this.currentTextures[textureUnit])
11481150
{
1149-
this.flush();
1151+
if (flush)
1152+
{
1153+
this.flush();
1154+
}
11501155

11511156
if (this.currentActiveTextureUnit !== textureUnit)
11521157
{

0 commit comments

Comments
 (0)