add func for creating texture without data
This commit is contained in:
parent
ec98ea6f5b
commit
c2b7544979
17
vulkan.d
17
vulkan.d
@ -988,6 +988,23 @@ CreateImageView(Vulkan* vk, Descriptor* view, u32 w, u32 h, u32 ch, u8[] data, D
|
|||||||
CreateImageView(vk, &view.view, w, h, ch, data);
|
CreateImageView(vk, &view.view, w, h, ch, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CreateImageViewTex(Vulkan* vk, Descriptor* desc, u32 w, u32 h, DescType type = DT.Image, u32 binding, u32 index)
|
||||||
|
{
|
||||||
|
desc.array_elem = true;
|
||||||
|
desc.index = index;
|
||||||
|
CreateImageViewTex(vk, desc, w, h, type, binding);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CreateImageViewTex(Vulkan* vk, Descriptor* desc, u32 w, u32 h, DescType type = DT.Image, u32 binding)
|
||||||
|
{
|
||||||
|
ImageDescCheck(type);
|
||||||
|
desc.type = type;
|
||||||
|
desc.binding = binding;
|
||||||
|
CreateImageView(vk, &desc.view, w, h, FMT.RGBA_UNORM, IU.Texture);
|
||||||
|
}
|
||||||
|
|
||||||
pragma(inline): void
|
pragma(inline): void
|
||||||
CreateImageView(Vulkan* vk, ImageView* view, u32 w, u32 h, u32 ch, u8[] data)
|
CreateImageView(Vulkan* vk, ImageView* view, u32 w, u32 h, u32 ch, u8[] data)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user