UgMaterial
Material combining shaders, vertex layout, and per-pass pipeline cache
It
Material with its pipeline layout, shader program, and cached pipelines
struct It {
VkPipelineLayout layout;
VkDescriptorSetLayout textureSetLayouts[UG_MATERIAL_MAX_TEXTURES];
UgShaderProgram.It shaderProgram;
UgVertexDesc.It vertexDesc;
UgVertexSettings.It settings;
U32 textureCount;
UgMaterialPipelineEntry.It pipelineCache[UG_MATERIAL_MAX_RENDER_PASSES];
U32 pipelineCacheCount;
UgContext.It* ctx;
UgSwapchain.It* swapchain;
};destroy
Destroy the material and all cached pipelines
U0 destroy(UgContext.It& ctx, UgMaterial.It& mat);Parameters
ctx— Vulkan contextmat— Material to destroy