浏览代码

detect shader change during texture realloc - should not be allowed

Nicolas Cannasse 4 年之前
父节点
当前提交
adbe696687
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      h3d/impl/GlDriver.hx

+ 2 - 0
h3d/impl/GlDriver.hx

@@ -538,8 +538,10 @@ class GlDriver extends Driver {
 					}
 				}
 				if( t != null && t.t == null && t.realloc != null ) {
+					var s = curShader;
 					t.alloc();
 					t.realloc();
+					if( curShader != s ) throw "Shader has changed after realloc "+t;
 				}
 				t.lastFrame = frame;