Browse Source

Lazy loading of Textures from Images.

clementlandrin 1 year ago
parent
commit
8b4b433fdc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      hxd/res/Image.hx

+ 1 - 1
hxd/res/Image.hx

@@ -624,7 +624,7 @@ class Image extends Resource {
 		if( DEFAULT_FILTER != Linear ) tex.filter = DEFAULT_FILTER;
 		tex.setName(entry.path);
 		setupTextureFlags(tex);
-		loadTexture();
+		tex.realloc = () -> loadTexture();
 		return tex;
 	}