private IReadOnlyList <IVkLayerProperties> EnumerateInstanceLayerProperties() { int count; Direct.EnumerateInstanceLayerProperties(&count, (VkLayerProperties.Raw *) 0).CheckSuccess(); var rawArray = new VkLayerProperties.Raw[count]; fixed(VkLayerProperties.Raw *pRawArray = rawArray) { Direct.EnumerateInstanceLayerProperties(&count, pRawArray).CheckSuccess(); return(rawArray.Select(x => new VkLayerProperties(&x)).ToArray()); } }
private IReadOnlyList<IVkLayerProperties> EnumerateInstanceLayerProperties() { int count; Direct.EnumerateInstanceLayerProperties(&count, (VkLayerProperties.Raw*)0).CheckSuccess(); var rawArray = new VkLayerProperties.Raw[count]; fixed (VkLayerProperties.Raw* pRawArray = rawArray) { Direct.EnumerateInstanceLayerProperties(&count, pRawArray).CheckSuccess(); return rawArray.Select(x => new VkLayerProperties(&x)).ToArray(); } }