Преглед изворни кода

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;