mirror of
https://github.com/photonstorm/phaser
synced 2024-11-28 23:51:31 +00:00
Should rebind shaders too
This commit is contained in:
parent
ab1646c2a0
commit
166c333d13
1 changed files with 2 additions and 2 deletions
|
@ -854,14 +854,14 @@ var WebGLPipeline = new Class({
|
||||||
*/
|
*/
|
||||||
rebind: function ()
|
rebind: function ()
|
||||||
{
|
{
|
||||||
var wasBound = this.setVertexBuffer();
|
this.setVertexBuffer();
|
||||||
|
|
||||||
var shaders = this.shaders;
|
var shaders = this.shaders;
|
||||||
|
|
||||||
// Loop in reverse, so the first shader in the array is left as being bound
|
// Loop in reverse, so the first shader in the array is left as being bound
|
||||||
for (var i = shaders.length - 1; i >= 0; i--)
|
for (var i = shaders.length - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
this.currentShader = shaders[i].bind(wasBound);
|
this.currentShader = shaders[i].rebind();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.emit(Events.REBIND, this.currentShader);
|
this.emit(Events.REBIND, this.currentShader);
|
||||||
|
|
Loading…
Reference in a new issue