Browse Source

keep all unmanaged buffers to make sure to mark them as dispose() on context lost

ncannasse 6 years ago
parent
commit
e5a6d6601d
1 changed files with 0 additions and 4 deletions
  1. 0 4
      h3d/impl/MemoryManager.hx

+ 0 - 4
h3d/impl/MemoryManager.hx

@@ -113,7 +113,6 @@ class MemoryManager {
 		m.vbuf = null;
 		usedMemory -= m.size * m.stride * 4;
 		bufferCount--;
-		#if debug
 		if( !m.flags.has(Managed) ) {
 			var c = buffers[0], prev : ManagedBuffer = null;
 			while( c != null ) {
@@ -125,7 +124,6 @@ class MemoryManager {
 				c = c.next;
 			}
 		}
-		#end
 	}
 
 	@:allow(h3d.Buffer)
@@ -157,10 +155,8 @@ class MemoryManager {
 			if( b.flags.has(Dynamic) ) { if( flags == null ) flags = []; flags.push(Dynamic); }
 			if( b.flags.has(UniformBuffer) ) { if( flags == null ) flags = []; flags.push(UniformBuffer); }
  			var m = new ManagedBuffer(stride, b.vertices, flags);
-			#if debug
 			m.next = buffers[0];
 			buffers[0] = m;
-			#end
 			if( !m.allocBuffer(b) ) throw "assert";
 			return;
 		}