Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Compiler Error CS0029: Could not implicit convert to uint #92

Open
rafal1137 opened this issue Aug 30, 2021 · 1 comment
Open

Compiler Error CS0029: Could not implicit convert to uint #92

rafal1137 opened this issue Aug 30, 2021 · 1 comment

Comments

@rafal1137
Copy link

I started to writing a renderer using your bindings. I have run into weird anomaly.

Error CS0029: Could not convert implicit Vulkan.DeviceQueueCreateInfo[] to uint

Snipped of the code:

            var _queueInfo = new DeviceQueueCreateInfo { QueueFamilyIndex = _queueFamilyUsedIndex, QueuePriorities = new float[] { 1.0f } };
            var _deviceInfo = new DeviceCreateInfo
            {
                EnabledExtensionNames = new string[] { "VK_KHR_swapchain" },
                QueueCreateInfoCount = new DeviceQueueCreateInfo[] { _queueInfo }
            };

It points me to this line:

QueueCreateInfoCount = new DeviceQueueCreateInfo[] { _queueInfo }
@rafal1137
Copy link
Author

Someone pointed me to use another method of this class also did notified me about C# being strongly typed language.
And this has been solved in this code:

            var _deviceInfo = new DeviceCreateInfo
            {
                EnabledExtensionNames = new string[] { "VK_KHR_swapchain" },
                QueueCreateInfos = new DeviceQueueCreateInfo[]
            {
                new DeviceQueueCreateInfo
                {
                    QueueFamilyIndex = _queueFamilyUsedIndex,
                    QueuePriorities = new float[] { 1.0f }
                }
            }
        };

Fix worth of an RP

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant