LDKAssetImageData

typedef struct LDKAssetImageData{
  LDKImage *image;
  bool is_missing;
}LDKAssetImageData;
Function in ldk_asset_manager.h

ldk_asset_manager_image_create

Create the asset manager image.

LDK_API LDKAssetImage ldk_asset_manager_image_create(
 LDKAssetManager *manager,
 u32 width,
 u32 height,
 const void *pixels
);

Parameters

LDKAssetManager *manager
Asset manager that owns or resolves the asset.
u32 width
Width in pixels or the units expected by the API.
u32 height
Height in pixels or the units expected by the API.
const void *pixels
Image pixel data.

Returns

Handle to the requested object or resource.

Function in ldk_asset_manager.h

ldk_asset_manager_image_create_format

Create an image asset using an explicit pixel format.

LDK_API LDKAssetImage ldk_asset_manager_image_create_format(
 LDKAssetManager *manager,
 u32 width,
 u32 height,
 LDKImageFormat format,
 const void *pixels
);

Parameters

LDKAssetManager *manager
Asset manager that owns or resolves the asset.
u32 width
Width in pixels or the units expected by the API.
u32 height
Height in pixels or the units expected by the API.
LDKImageFormat format
Format to use for this resource.
const void *pixels
Image pixel data.

Returns

Handle to the requested object or resource.

Function in ldk_asset_manager.h

ldk_asset_manager_image_is_alive

Check whether the asset manager image refers to a live resource.

LDK_API bool ldk_asset_manager_image_is_alive(
 LDKAssetManager *manager,
 LDKAssetImage asset
);

Parameters

LDKAssetManager *manager
Asset manager that owns or resolves the asset.
LDKAssetImage asset
Asset handle to inspect or modify.

Returns

True when the queried condition holds; false otherwise.

Function in ldk_asset_manager.h

ldk_asset_manager_image_load

Load the asset manager image.

LDK_API LDKAssetImage ldk_asset_manager_image_load(
 LDKAssetManager *manager,
 const char *path
);

Parameters

LDKAssetManager *manager
Asset manager that owns or resolves the asset.
const char *path
Path identifying the file or resource.

Returns

Handle to the requested object or resource.

Function in ldk_asset_manager.h

ldk_asset_manager_image_load_shared

Load or reuse shared the asset manager image.

LDK_API LDKAssetImage ldk_asset_manager_image_load_shared(
 LDKAssetManager *manager,
 const char *path
);

Parameters

LDKAssetManager *manager
Asset manager that owns or resolves the asset.
const char *path
Path identifying the file or resource.

Returns

Handle to the requested object or resource.

Function in ldk_asset_manager.h

ldk_asset_manager_image_missing

Create or retrieve a missing-image placeholder asset.

LDK_API LDKAssetImage ldk_asset_manager_image_missing(
 LDKAssetManager *manager,
 const char *path
);

Parameters

LDKAssetManager *manager
Asset manager that owns or resolves the asset.
const char *path
Path identifying the file or resource.

Returns

Handle to the requested object or resource.