Handle more invalidated state on WebGL context restore.

This commit is contained in:
Ben Richards 2024-02-02 15:53:03 +13:00
parent 4c849cb2f7
commit b66028ec8e

View file

@ -1207,6 +1207,14 @@ var WebGLPipeline = new Class({
{
var shaders = this.shaders;
// Deactivate all invalidated state.
this.activeBuffer = null;
this.activeTextures.length = 0;
this.batch.length = 0;
this.currentBatch = null;
this.currentTexture = null;
this.currentUnit = 0;
for (var i = 0; i < shaders.length; i++)
{
shaders[i].syncUniforms();