mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
PIXI._CompileShader can now take an array or a string for the fragment src.
This commit is contained in:
parent
1f66cdbcb5
commit
1c9fb614a4
1 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue