// Copyright (c) 2019 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
//
// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
+using System;
using vke;
using Vulkan;
//is handled automatically by the render pass.
renderPass = new RenderPass (dev, swapChain.ColorFormat);
//default clear values are automatically added for each attacments
- renderPass.ClearValues[0] = new VkClearValue (0.1f, 0.2f, 1);
+ renderPass.ClearValues[0] = new VkClearValue (0.9f, 0.9f, 1);
+
+ Console.WriteLine ($"{renderPass.ClearValues[0].color.float32[0]}");
+
//bound to a pipeline, renderpasses are automatically activated, here we use
//a stand alone renderpass just to clear the screen, so we have to
//activate it manually
public VkQueueFamilyProperties [] QueueFamilies { get; private set; }
public VkPhysicalDeviceProperties Properties {
get {
- vkGetPhysicalDeviceProperties (phy, out VkPhysicalDeviceProperties pdp);
+ IntPtr ptr = Marshal.AllocHGlobal (Marshal.SizeOf<VkPhysicalDeviceProperties> ());
+ vkGetPhysicalDeviceProperties (phy, ptr);
+ VkPhysicalDeviceProperties pdp = Marshal.PtrToStructure<VkPhysicalDeviceProperties> (ptr);
+ Marshal.FreeHGlobal (ptr);
return pdp;
}
}
<ItemGroup>
<PackageReference Include="SpirVTasks" Version="$(SpirVTasksPackageVersion)" />
- <PackageReference Include="Vulkan" Version="0.2.2.2-beta" />
+ <PackageReference Include="Vulkan" Version="0.2.19-beta" />
<PackageReference Include="glfw-sharp" Version="0.2.2" />
<PackageReference Include="shaderc.net" Version="0.1.0" />
</ItemGroup>