Explorar o código

detect shader change during texture realloc - should not be allowed

Nicolas Cannasse %!s(int64=5) %!d(string=hai) anos
pai
achega
adbe696687
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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;