mirror of
https://github.com/photonstorm/phaser
synced 2024-12-02 17:41:06 +00:00
The Blitter Game Object WebGL Renderer function has been updated to support multi-texture units.
This commit is contained in:
parent
ec0914cd0f
commit
446389bb4d
1 changed files with 2 additions and 2 deletions
|
@ -99,7 +99,7 @@ var BlitterWebGLRenderer = function (renderer, src, interpolationPercentage, cam
|
||||||
// Bind texture only if the Texture Source is different from before
|
// Bind texture only if the Texture Source is different from before
|
||||||
if (frame.sourceIndex !== prevTextureSourceIndex)
|
if (frame.sourceIndex !== prevTextureSourceIndex)
|
||||||
{
|
{
|
||||||
pipeline.setTexture2D(frame.glTexture, 0);
|
var textureUnit = renderer.setTextureSource(frame.source);
|
||||||
|
|
||||||
prevTextureSourceIndex = frame.sourceIndex;
|
prevTextureSourceIndex = frame.sourceIndex;
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ var BlitterWebGLRenderer = function (renderer, src, interpolationPercentage, cam
|
||||||
}
|
}
|
||||||
|
|
||||||
// TL x/y, BL x/y, BR x/y, TR x/y
|
// TL x/y, BL x/y, BR x/y, TR x/y
|
||||||
if (pipeline.batchQuad(tx0, ty0, tx0, ty1, tx1, ty1, tx1, ty0, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, tintEffect, frame.glTexture, 0))
|
if (pipeline.batchQuad(tx0, ty0, tx0, ty1, tx1, ty1, tx1, ty0, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, tintEffect, frame.glTexture, textureUnit))
|
||||||
{
|
{
|
||||||
prevTextureSourceIndex = -1;
|
prevTextureSourceIndex = -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue