private VkShaderModule createShaderModule(Type shaderCode) { VkShaderModuleCreateInfo createInfo = new VkShaderModuleCreateInfo(); createInfo.sType = VkStructureType.VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; createInfo.pCode = shaderCode; VkShaderModule shaderModule = null; VkResult result; result = Vulkan.vkCreateShaderModule(device, createInfo, default(VkAllocationCallbacks), out shaderModule); if (result != VkResult.VK_SUCCESS) { throw Program.Throw("failed to create shader module!", result); } return(shaderModule); }