فهرست منبع

Lazy loading of Textures from Images.

clementlandrin 1 سال پیش
والد
کامیت
8b4b433fdc
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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;
 	}