Explorar el Código

detect shader change during texture realloc - should not be allowed

Nicolas Cannasse hace 5 años
padre
commit
adbe696687
Se han modificado 1 ficheros con 2 adiciones y 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;