예제 #1
0
파일: VkGlobal.cs 프로젝트: Zulkir/VulkaNet
        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());
            }
        }
예제 #2
0
 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();
     }
 }