]> O.S.I.I.S - jp/crow.git/commitdiff
Merge branch 'temp' of https://github.com/jpbruyere/Crow into vknet
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Sun, 5 May 2019 20:56:14 +0000 (22:56 +0200)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Sun, 5 May 2019 20:56:14 +0000 (22:56 +0200)
1  2 
Crow/Crow.csproj
Samples/HelloWorld/HelloWorld.csproj
Samples/HelloWorld/main.cs
Samples/ShowCase/ShowCase.csproj
Samples/ShowCase/main.cs

Simple merge
index 64976e458e4351bea80c0b2412c8eac103ac1283,e9074cfcd4ec0940bce3b443c183ee6a8d448005..cda10df5fd1588941e6af57e054a05fe629bec4e
@@@ -28,6 -29,6 +29,6 @@@
      </EmbeddedResource>                
    </ItemGroup>     
    <ItemGroup>
-     <PackageReference Include="CVKL" Version="0.1.3-beta" />
+     <PackageReference Include="CVKL" Version="0.1.3.2-beta" />
    </ItemGroup>
--</Project>
++</Project>
index 3255220076d6286abcca74ff111fdbcddf3312d4,1590f28b92fe716daa58cd0c4b302984b1c8cfc0..9465f713ae9798f8c4ba609f9d709b61470d9120
@@@ -13,4 -11,4 +11,4 @@@ namespace HelloWorl
                }
  
        }
--}
++}
index b0f5b20092da6c7b01cf4e2518a89a93f226142e,032f177962764fda97d17d6da4df3dd6814b5604..e557be1a92c5f72e075f9666611f156aca5b01de
@@@ -1,70 -1,47 +1,45 @@@
- <?xml version="1.0" encoding="utf-8"?>
- <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 -<Project Sdk="Microsoft.NET.Sdk">
++<Project Sdk="Microsoft.NET.Sdk">
+   <Import Project="$(SolutionDir)netfx.props" />
    <PropertyGroup>
-     <OutputType>Exe</OutputType>
-     <TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
-     <OutputPath>$(SolutionDir)build\$(Configuration)\samples\</OutputPath>
-     <ProductVersion>8.0.30703</ProductVersion>
-     <SchemaVersion>2.0</SchemaVersion>
-     <ProjectGuid>{56329D48-D382-4850-93DE-59C453894E8A}</ProjectGuid>
+     <TargetFrameworks>net472</TargetFrameworks>
+     <OutputPath>$(SolutionDir)build\$(Configuration)\</OutputPath>
+     <OutputType>Exe</OutputType>        
+     <RepositoryUrl>https://github.com/jpbruyere/Crow</RepositoryUrl>
+     <License>https://opensource.org/licenses/MIT</License>
+     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+     <EnableDefaultNoneItems>false</EnableDefaultNoneItems>    
+     <TargetFramework>net472</TargetFramework>
      <ReleaseVersion>0.8.0</ReleaseVersion>
    </PropertyGroup>
+             
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-     <DebugSymbols>true</DebugSymbols>
      <DebugType>full</DebugType>
-     <Optimize>false</Optimize>
-     <DefineConstants>DEBUG</DefineConstants>
-     <ErrorReport>prompt</ErrorReport>
-     <WarningLevel>4</WarningLevel>
+     <DefineConstants>TRACE;DEBUG</DefineConstants>
+     <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
    </PropertyGroup>
-   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-     <Optimize>true</Optimize>
-     <WarningLevel>4</WarningLevel>      
-   </PropertyGroup>
-   <ItemGroup>
-     <Compile Include="*.cs" />
+     
+   <ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
+     <Reference Include="System" />
+   </ItemGroup>    
+   <ItemGroup>  
+     <ProjectReference Include="..\..\Crow\Crow.csproj" />
+   </ItemGroup>    
+     
+   <ItemGroup>    
+     <Compile Include="..\common\CrowWin.cs" />
+     <Datas Include="..\data\**\*.*">      
+       <Link>data\%(RecursiveDir)%(Filename)%(Extension)</Link>
+     </Datas>
      <EmbeddedResource Include="ui\*.*">        
        <LogicalName>ShowCase.%(Filename)%(Extension)</LogicalName>
-     </EmbeddedResource>        
-     <None Include="ui\Interfaces\**\*.*">  
+     </EmbeddedResource>                
+     <None Include="..\common\ui\Interfaces\**\*.*">  
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        <Link>Interfaces\%(RecursiveDir)%(Filename)%(Extension)</Link>
      </None>
-     <EmbeddedResource Include="ui\divers\*.*">        
-       <LogicalName>ShowCase.divers.%(Filename)%(Extension)</LogicalName>
-     </EmbeddedResource>        
-   </ItemGroup>
-   <ItemGroup>
-     <Reference Include="System" />
-     <Reference Include="Newtonsoft.Json">
-       <HintPath>..\..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
-     </Reference>
-     <Reference Include="glTFLoader">
-       <HintPath>..\..\packages\glTF2Loader.1.1.3-alpha\lib\net35\glTFLoader.dll</HintPath>
-     </Reference>
-     <Reference Include="System.Numerics.Vectors">
-       <HintPath>..\..\packages\System.Numerics.Vectors.4.6.0-preview4.19212.13\lib\net46\System.Numerics.Vectors.dll</HintPath>
-     </Reference>
-     <Reference Include="mscorlib" />
-     <Reference Include="System.Numerics" />
-     <Reference Include="System.Runtime.CompilerServices.Unsafe">
-       <HintPath>..\..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0-preview4.19212.13\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
-     </Reference>
-     <Reference Include="VK">
-       <HintPath>..\..\packages\Vulkan.0.1.2.6\lib\netstandard2.0\VK.dll</HintPath>
-     </Reference>
-     <Reference Include="CVKL-dotnet">
-       <HintPath>..\..\packages\CVKL.0.1.2\lib\netstandard2.0\CVKL-dotnet.dll</HintPath>
-     </Reference>
-   </ItemGroup> 
-   <ItemGroup>
-     <ProjectReference Include="..\..\Crow\Crow.csproj">
-       <Project>{C2980F9B-4798-4C05-99E2-E174810F7C7B}</Project>
-       <Name>Crow</Name>
-     </ProjectReference>
-   </ItemGroup>
+   </ItemGroup>     
    <ItemGroup>
-     <None Include="packages.config" />
+     <PackageReference Include="CVKL" Version="0.1.3.2-beta" />
    </ItemGroup>
-   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  </Project>
 -
 -    
index b3437aebbf2a06a9f02a80bfe1d30bae03ac27a8,6bd63bb04b4d9f28d20ed787e6f508df82802352..9c93758b0b6670b161ae43fdc435590d6182b026
@@@ -1,9 -1,5 +1,5 @@@
- using System;
 -using System.IO;
 +using System.IO;
- using System.Threading;
  using Crow;
- using CVKL;
- using VK;
  
  namespace HelloWorld
  {
                {
                        NotifyValueChanged ("ShowError", false);
                }
-               void buildCommandBuffers () {
-                       for (int i = 0; i < swapChain.ImageCount; ++i) {
-                               cmds[i]?.Free ();
-                               cmds[i] = cmdPool.AllocateAndStart ();
-                               CommandBuffer cmd = cmds [i];
-                               swapChain.images [i].SetLayout (cmd, VkImageAspectFlags.Color,
-                                       VkImageLayout.Undefined, VkImageLayout.TransferDstOptimal,
-                                       VkPipelineStageFlags.BottomOfPipe, VkPipelineStageFlags.Transfer);
-                               uiImage.SetLayout (cmd, VkImageAspectFlags.Color,
-                                       VkImageLayout.ColorAttachmentOptimal, VkImageLayout.TransferSrcOptimal,
-                                       VkPipelineStageFlags.ColorAttachmentOutput, VkPipelineStageFlags.Transfer);
-                                       
-                               VkImageSubresourceLayers imgSubResLayer = new VkImageSubresourceLayers {
-                                       aspectMask = VkImageAspectFlags.Color,
-                                       mipLevel = 0,
-                                       baseArrayLayer = 0,
-                                       layerCount = 1
-                               };
-                               VkImageCopy cregion = new VkImageCopy {
-                                       srcSubresource = imgSubResLayer,
-                                       srcOffset = default (VkOffset3D),
-                                       dstSubresource = imgSubResLayer,
-                                       dstOffset = default (VkOffset3D),
-                                       extent = new VkExtent3D { width = swapChain.Width, height = swapChain.Height }
-                               };
-                               Vk.vkCmdCopyImage (cmds [i].Handle, uiImage.Handle, VkImageLayout.TransferSrcOptimal,
-                                       swapChain.images [i].Handle, VkImageLayout.TransferDstOptimal, 1, ref cregion);
-                               swapChain.images [i].SetLayout (cmd, VkImageAspectFlags.Color,
-                                       VkImageLayout.TransferDstOptimal, VkImageLayout.PresentSrcKHR,
-                                       VkPipelineStageFlags.Transfer, VkPipelineStageFlags.BottomOfPipe);
-                               uiImage.SetLayout (cmd, VkImageAspectFlags.Color,
-                                       VkImageLayout.TransferSrcOptimal, VkImageLayout.ColorAttachmentOptimal,
-                                       VkPipelineStageFlags.Transfer, VkPipelineStageFlags.ColorAttachmentOutput);
-                               cmds [i].End ();
-                       }
-               }
-               #region update
-               int frameCount = 0;
-               public override void Update () {
-                       if (++frameCount > 20) {
-                               NotifyValueChanged ("fps", fps);
-                               frameCount = 0;
-                       }
-               }
-               #endregion
-               protected override void OnResize () {
-                       dev.WaitIdle ();
-                       crow.ProcessResize (new Crow.Rectangle (0, 0, (int)swapChain.Width, (int)swapChain.Height));
-                       initUISurface ();
-                       buildCommandBuffers ();
-                       dev.WaitIdle ();
-               }
-               #region Mouse and keyboard
-               //protected override void onScroll (double xOffset, double yOffset)
-               //{
-               //      if (KeyModifiers.HasFlag (Glfw.Modifier.Shift))
-               //              crow.ProcessMouseWheelChanged ((float)xOffset);
-               //      else
-               //              crow.ProcessMouseWheelChanged ((float)yOffset);
-               //}
-               protected override void onMouseMove (double xPos, double yPos)
-               {
-                       if (crow.ProcessMouseMove ((int)xPos, (int)yPos))
-                               return;
-               }
-               protected override void onMouseButtonDown (Glfw.MouseButton button)
-               {
-                       if (crow.ProcessMouseButtonDown ((Crow.MouseButton)button))
-                               return;
-                       base.onMouseButtonDown (button);
-               }
-               protected override void onMouseButtonUp (Glfw.MouseButton button)
-               {
-                       if (crow.ProcessMouseButtonUp ((Crow.MouseButton)button))
-                               return;
-                       base.onMouseButtonUp (button);
-               }
-               protected override void onKeyDown (Glfw.Key key, int scanCode, Glfw.Modifier modifiers)
-               {
-                       if (crow.ProcessKeyDown ((Crow.Key)key))
-                               return;
-               }
-               protected override void onKeyUp (Glfw.Key key, int scanCode, Glfw.Modifier modifiers)
-               {
-                       if (crow.ProcessKeyUp ((Crow.Key)key))
-                               return;
-               }
-               //protected override void onChar (Glfw.CodePoint cp)
-               //{
-               //      if (crow.ProcessKeyPress (cp.ToChar ()))
-               //              return;
-               //}
-               #endregion
-               #region dispose
-               protected override void Dispose (bool disposing) {
-                       if (disposing) {
-                               if (!isDisposed) {
-                                       dev.WaitIdle ();
-                                       isRunning = false;
-                                       uiImage?.Dispose ();
-                                       while (crow != null)
-                                               Thread.Sleep (1);
-                               }
-                       }
-                       base.Dispose (disposing);
-               }
-               #endregion
        }
--}
++}