Browse Source

added setupTextureFlags for mipmap/filters/etc.

Nicolas Cannasse 5 năm trước cách đây
mục cha
commit
07c228c0d9
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      hxd/res/Image.hx

+ 6 - 1
hxd/res/Image.hx

@@ -366,9 +366,11 @@ class Image extends Resource {
 			format = R32F;
 		default:
 		}
-		tex = new h3d.mat.Texture(width, height, [NoAlloc], format);
+		var flags : Array<h3d.mat.Data.TextureFlags> = [NoAlloc];
+		tex = new h3d.mat.Texture(width, height, flags, format);
 		if( DEFAULT_FILTER != Linear ) tex.filter = DEFAULT_FILTER;
 		tex.setName(entry.path);
+		setupTextureFlags(tex);
 		loadTexture();
 		return tex;
 	}
@@ -378,4 +380,7 @@ class Image extends Resource {
 		return h2d.Tile.fromTexture(toTexture()).sub(0, 0, size.width, size.height);
 	}
 
+	public static dynamic function setupTextureFlags( tex : h3d.mat.Texture ) {
+	}
+
 }