mirror of
https://github.com/photonstorm/phaser
synced 2024-11-25 06:00:41 +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 ()
|
||||
{
|
||||
var wasBound = this.setVertexBuffer();
|
||||
this.setVertexBuffer();
|
||||
|
||||
var shaders = this.shaders;
|
||||
|
||||
// Loop in reverse, so the first shader in the array is left as being bound
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue