Explorar el Código

Lazy loading on texture only if texture is not array (waiting for fix on dx12).

clementlandrin hace 1 año
padre
commit
7622436622
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      hxd/res/Image.hx

+ 5 - 1
hxd/res/Image.hx

@@ -624,7 +624,11 @@ class Image extends Resource {
 		if( DEFAULT_FILTER != Linear ) tex.filter = DEFAULT_FILTER;
 		tex.setName(entry.path);
 		setupTextureFlags(tex);
-		tex.realloc = () -> loadTexture();
+		// DirectX12 texture array triggers an access violation.
+		if ( tex.flags.has(IsArray) )
+			loadTexture();
+		else
+			tex.realloc = () -> loadTexture();
 		return tex;
 	}