LDKMaterialTextureFilter
typedef enum LDKMaterialTextureFilter{
LDK_MATERIAL_TEXTURE_FILTER_NEAREST=0,
LDK_MATERIAL_TEXTURE_FILTER_LINEAR=1
}LDKMaterialTextureFilter;
typedef enum LDKMaterialTextureFilter{
LDK_MATERIAL_TEXTURE_FILTER_NEAREST=0,
LDK_MATERIAL_TEXTURE_FILTER_LINEAR=1
}LDKMaterialTextureFilter;
typedef enum LDKMaterialTextureMipFilter{
LDK_MATERIAL_TEXTURE_MIP_FILTER_NONE=0,
LDK_MATERIAL_TEXTURE_MIP_FILTER_NEAREST=1,
LDK_MATERIAL_TEXTURE_MIP_FILTER_LINEAR=2
}LDKMaterialTextureMipFilter;
typedef struct LDKMaterialTextureSettings{
LDKMaterialTextureFilter filter;
LDKMaterialTextureMipFilter mip_filter;
LDKMaterialTextureWrap wrap_u;
LDKMaterialTextureWrap wrap_v;
Vec2 uv_scale;
Vec2 uv_offset;
bool independent;
}LDKMaterialTextureSettings;
typedef enum LDKMaterialTextureSlot{
LDK_MATERIAL_TEXTURE_SLOT_ALBEDO=0,
LDK_MATERIAL_TEXTURE_SLOT_NORMAL=1,
LDK_MATERIAL_TEXTURE_SLOT_SPECULAR=2,
LDK_MATERIAL_TEXTURE_SLOT_3=3,
LDK_MATERIAL_TEXTURE_SLOT_4=4,
LDK_MATERIAL_TEXTURE_SLOT_5=5,
LDK_MATERIAL_TEXTURE_SLOT_6=6,
LDK_MATERIAL_TEXTURE_SLOT_7=7
}LDKMaterialTextureSlot;
typedef enum LDKMaterialTextureWrap{
LDK_MATERIAL_TEXTURE_WRAP_REPEAT=0,
LDK_MATERIAL_TEXTURE_WRAP_CLAMP=1,
LDK_MATERIAL_TEXTURE_WRAP_MIRROR=2
}LDKMaterialTextureWrap;
typedef struct LDKMaterialTexturedArgs{
LDKAssetImage texture;
LDKMaterialTextureFilter filter;
LDKMaterialTextureMipFilter mip_filter;
LDKMaterialTextureWrap wrap_u;
LDKMaterialTextureWrap wrap_v;
Vec2 uv_scale;
Vec2 uv_offset;
rgba32 color;
}LDKMaterialTexturedArgs;
#define LDK_MATERIAL_ADDITIONAL_TEXTURE_COUNT 5u
#define LDK_MATERIAL_TEXTURE_SLOT_COUNT 8u
Assign an atlas region to a material slot; region 0 means full atlas.
LDK_API bool ldk_material_texture_atlas_set(
LDKMaterialDesc *desc,
u32 slot,
LDKAssetTextureAtlas atlas,
u64 region
);
LDKMaterialDesc *descu32 slotLDKAssetTextureAtlas atlasu64 regionTrue if the operation succeeds; false otherwise.
Return independent settings, or the legacy material defaults.
LDK_API LDKMaterialTextureSettings ldk_material_texture_settings_get(
LDKMaterialDesc const *desc,
u32 slot
);
LDKMaterialDesc const *descu32 slotThe requested value.
Return the image assigned to a material texture slot.
LDK_API LDKAssetImage ldk_material_texture_slot_get(
LDKMaterialDesc const *desc,
u32 slot
);
LDKMaterialDesc const *descu32 slotHandle to the requested object or resource.
Assign an image to a material texture slot.
LDK_API bool ldk_material_texture_slot_set(
LDKMaterialDesc *desc,
u32 slot,
LDKAssetImage image
);
LDKMaterialDesc *descu32 slotLDKAssetImage imageTrue if the operation succeeds; false otherwise.