PIXI._CompileShader can now take an array or a string for the fragment src.

This commit is contained in:
Richard Davey 2015-07-15 23:20:39 +01:00
parent 1f66cdbcb5
commit 1c9fb614a4

View file

@ -46,7 +46,13 @@ PIXI.CompileFragmentShader = function(gl, shaderSrc)
*/
PIXI._CompileShader = function(gl, shaderSrc, shaderType)
{
var src = shaderSrc.join("\n");
var src = shaderSrc;
if (Array.isArray(shaderSrc))
{
src = shaderSrc.join("\n");
}
var shader = gl.createShader(shaderType);
gl.shaderSource(shader, src);
gl.compileShader(shader);