diff options
Diffstat (limited to 'CrowWindow')
| -rw-r--r-- | CrowWindow/CrowWindow.csproj | 4 | ||||
| -rw-r--r-- | CrowWindow/VkCrowWindow.cs | 14 |
2 files changed, 13 insertions, 5 deletions
diff --git a/CrowWindow/CrowWindow.csproj b/CrowWindow/CrowWindow.csproj index 1da19de..f579535 100644 --- a/CrowWindow/CrowWindow.csproj +++ b/CrowWindow/CrowWindow.csproj @@ -1,4 +1,4 @@ -<Project Sdk="Microsoft.NET.Sdk"> +<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <AssemblyName>CrowWindow</AssemblyName> @@ -15,7 +15,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Crow" Version="0.9.4-beta" /> + <PackageReference Include="Crow" Version="0.9.3-beta" /> <PackageReference Include="vke" Version="0.2.0-beta" /> <PackageReference Include="SpirVTasks" Version="0.1.44" /> </ItemGroup> diff --git a/CrowWindow/VkCrowWindow.cs b/CrowWindow/VkCrowWindow.cs index f37fda2..a7e6f74 100644 --- a/CrowWindow/VkCrowWindow.cs +++ b/CrowWindow/VkCrowWindow.cs @@ -23,6 +23,7 @@ namespace vke { } #endregion + protected CrowWindow() : base("vkChess.net", 800, 600,false) {} public bool MouseIsInInterface => iFace.HoverWidget != null; @@ -63,9 +64,11 @@ namespace vke { ui.IsBackground = true; ui.Start (); } - protected virtual void CreateRenderPass () { + protected virtual void CreateRenderPass () { + //renderPass = new RenderPass (dev, swapChain.ColorFormat, VkSampleCountFlags.SampleCount1); renderPass = new RenderPass (dev, VkSampleCountFlags.SampleCount1); - renderPass.AddAttachment (swapChain.ColorFormat, VkImageLayout.PresentSrcKHR, VkSampleCountFlags.SampleCount1, VkAttachmentLoadOp.Load);//final outpout + renderPass.AddAttachment (swapChain.ColorFormat, VkImageLayout.PresentSrcKHR, VkSampleCountFlags.SampleCount1, + VkAttachmentLoadOp.Load, VkAttachmentStoreOp.DontCare, VkImageLayout.ColorAttachmentOptimal);//final outpout SubPass subpass0 = new SubPass (); subpass0.AddColorReference (0, VkImageLayout.ColorAttachmentOptimal); renderPass.AddSubpass (subpass0); @@ -236,12 +239,17 @@ namespace vke { w.DataSource = dataSource; } catch (Exception ex) { - System.Diagnostics.Debug.WriteLine (ex.Message); + System.Diagnostics.Debug.WriteLine (ex); } } protected void loadIMLFragment (string imlFragment, object dataSource = null) { iFace.LoadIMLFragment (imlFragment).DataSource = dataSource; } + protected T loadIMLFragment<T> (string imlFragment, object dataSource = null) { + Widget tmp = iFace.LoadIMLFragment (imlFragment); + tmp.DataSource = dataSource; + return (T)Convert.ChangeType (tmp,typeof(T)); + } protected void closeWindow (string path) { Widget g = iFace.FindByName (path); if (g != null) |