aboutsummaryrefslogtreecommitdiffstatsci
path: root/CrowWindow
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-04-20 10:02:04 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-04-20 10:02:04 +0200
commitc0a6bb6ae6db8f4de39b630a2f5e20c3f976e6a9 (patch)
treef97941afc96ab415bbe16d63345704a0c4b9764a /CrowWindow
parent30f1e58efb3910a41cee30ff89a1028fba97c3c1 (diff)
Diffstat (limited to 'CrowWindow')
-rw-r--r--CrowWindow/CrowWindow.csproj4
-rw-r--r--CrowWindow/VkCrowWindow.cs14
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)