Преглед на файлове

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;