Browse Source

Fix depth buffer allocated with texture cache.

clementlandrin 1 year ago
parent
commit
686c567670
1 changed files with 2 additions and 1 deletions
  1. 2 1
      h3d/mat/Texture.hx

+ 2 - 1
h3d/mat/Texture.hx

@@ -213,7 +213,8 @@ class Texture {
 	}
 
 	public inline function isDisposed() {
-		return t == null && realloc == null;
+		// realloc unsupported on depth buffers.
+		return t == null && (isDepth() || realloc == null);
 	}
 
 	public function resize(width, height) {