Skip to content

Commit 224c397

Browse files
committed
Added dynamic shader selection if multi texture is enabled. If not it'll fallback to default pixi shader
1 parent 4ecab8a commit 224c397

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

src/pixi/renderers/webgl/WebGLRenderer.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -220,21 +220,6 @@ PIXI.WebGLRenderer.prototype.initContext = function()
220220

221221
this.maxTextures = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);
222222

223-
// HACK: Fill all texture units with empty 1x1 texture
224-
// ---
225-
if (PIXI._enableMultiTextureToggle)
226-
{
227-
var tempTexture = gl.createTexture();
228-
gl.bindTexture(gl.TEXTURE_2D, tempTexture);
229-
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, 1, 1, 0, gl.RGB, gl.UNSIGNED_BYTE, null);
230-
for (var index = 0; index < this.maxTextures; ++index)
231-
{
232-
gl.activeTexture(gl.TEXTURE0 + index);
233-
gl.bindTexture(gl.TEXTURE_2D, tempTexture);
234-
}
235-
}
236-
// ---
237-
238223
this.glContextId = gl.id = PIXI.WebGLRenderer.glContextId++;
239224

240225
PIXI.glContexts[this.glContextId] = gl;

0 commit comments

Comments
 (0)