コード例 #1
0
ファイル: Vulkan.cs プロジェクト: bazoocaze/VulkanCpu
 public static VkResult vkEnumerateInstanceExtensionProperties(string pLayerName, ref int pPropertyCount, VkExtensionProperties[] pProperties)
 {
     if (pLayerName == null)
     {
         return(VkArrayUtil.CopyToList(m_GlobalExtensionProperties, pProperties, ref pPropertyCount));
     }
     return(VkResult.VK_SUCCESS);
 }
コード例 #2
0
        public VkResult EnumeratePhysicalDevices(ref int pPhysicalDeviceCount, VkPhysicalDevice[] pPhysicalDevices)
        {
            if (m_physicalDevices == null)
            {
                m_physicalDevices = new List <VkPhysicalDevice>();

                foreach (Type typeFactory in VkReflectionUtil.EnumerateInterfaces <IVkPhysicalDeviceFactory>())
                {
                    IVkPhysicalDeviceFactory factory = (IVkPhysicalDeviceFactory)Activator.CreateInstance(typeFactory);
                    foreach (var device in factory.EnumeratePhysicalDevices01(this))
                    {
                        m_physicalDevices.Add(device);
                    }
                }
            }

            return(VkArrayUtil.CopyToList(m_physicalDevices, pPhysicalDevices, ref pPhysicalDeviceCount));
        }
コード例 #3
0
ファイル: Vulkan.cs プロジェクト: bazoocaze/VulkanCpu
 public static VkResult vkEnumerateInstanceLayerProperties(ref int pPropertyCount, VkLayerProperties[] pProperties)
 {
     return(VkArrayUtil.CopyToList(m_GlobalLayerProperties, pProperties, ref pPropertyCount));
 }
コード例 #4
0
 public void GetQueueFamilyProperties(ref int queueFamilyCount, VkQueueFamilyProperties[] queueFamilies)
 {
     VkArrayUtil.CopyToList(m_QueueFamilyProperties, queueFamilies, ref queueFamilyCount);
 }
コード例 #5
0
 public virtual VkResult EnumerateExtensionProperties(ref int extensionCount, VkExtensionProperties[] availableExtensions)
 {
     return(VkArrayUtil.CopyToList(m_ExtensionProperties, availableExtensions, ref extensionCount));
 }
コード例 #6
0
 public VkResult GetSwapchainImages(ref int imageCount, VkImage[] swapChainImages)
 {
     return(VkArrayUtil.CopyToList(m_Images, swapChainImages, ref imageCount));
 }
コード例 #7
0
 public VkResult GetPresentModes(ref int presentModeCount, VkPresentModeKHR[] presentModes)
 {
     return(VkArrayUtil.CopyToList(m_PresentModes, presentModes, ref presentModeCount));
 }
コード例 #8
0
 public VkResult GetFormats(ref int formatCount, VkSurfaceFormatKHR[] formats)
 {
     return(VkArrayUtil.CopyToList(m_Formats, formats, ref formatCount));
 }