Reset the buffer and textures on rebind.

This commit is contained in:
Richard Davey 2022-11-15 21:54:43 +00:00
parent 6220d9b18d
commit 2f720246ab

View file

@ -1125,6 +1125,8 @@ var WebGLPipeline = new Class({
*/
rebind: function (currentShader)
{
this.activeBuffer = null;
this.setVertexBuffer();
var shaders = this.shaders;
@ -1140,6 +1142,8 @@ var WebGLPipeline = new Class({
}
}
this.activeTextures.length = 0;
this.emit(Events.REBIND, this.currentShader);
this.onActive(this.currentShader);