Răsfoiți Sursa

Updated nuget packages

vpenades 2 ani în urmă
părinte
comite
c8be502e29

+ 1 - 0
src/Demo1/Demo1.csproj

@@ -4,6 +4,7 @@
     <TargetFramework>net6.0</TargetFramework>
     <PublishReadyToRun>false</PublishReadyToRun>
     <TieredCompilation>false</TieredCompilation>
+  <IsPackable>false</IsPackable>
   </PropertyGroup>
   <PropertyGroup>
     <ApplicationManifest>app.manifest</ApplicationManifest>

+ 2 - 2
src/Demo1/Game1.cs

@@ -32,9 +32,9 @@ namespace Demo1
         {
             var gltfFactory = new MonoScene.Graphics.Pipeline.GltfModelFactory(this.GraphicsDevice);
 
-            var modelPath = SharpGLTF.Schema2.ModelRoot.Load($"Content{Path.DirectorySeparatorChar}WaterBottle.glb");
+            var model = SharpGLTF.Schema2.ModelRoot.Load($"Content{Path.DirectorySeparatorChar}WaterBottle.glb");
 
-            var contentMeshes = gltfFactory.ReadMeshContent(modelPath.LogicalMeshes.Take(1));
+            var contentMeshes = gltfFactory.ReadMeshContent(model.LogicalMeshes.Take(1));
 
             var factory = new MonoScene.Graphics.Pipeline.PBRMeshFactory(this.GraphicsDevice);            
             _MeshCollection = factory.CreateMeshCollection(contentMeshes.Materials, contentMeshes.Meshes);

+ 1 - 0
src/Demo2/Demo2.csproj

@@ -4,6 +4,7 @@
     <TargetFramework>net6.0</TargetFramework>
     <PublishReadyToRun>false</PublishReadyToRun>
     <TieredCompilation>false</TieredCompilation>
+    <IsPackable>false</IsPackable>
   </PropertyGroup>
   <PropertyGroup>
     <ApplicationManifest>app.manifest</ApplicationManifest>

+ 1 - 1
src/Demo2/Game1.cs

@@ -59,7 +59,7 @@ namespace Demo2
         {
             if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape)) Exit();
 
-            if (_ModelView1 == null) _ModelView1 = _ModelTemplate.DefaultModel.CreateInstance();
+            _ModelView1 ??= _ModelTemplate.DefaultModel.CreateInstance();
 
             var mdlPos = new Vector3(3.5f, 0, 0);
 

+ 1 - 0
src/Demo3/Demo3.csproj

@@ -4,6 +4,7 @@
     <TargetFramework>net6.0</TargetFramework>
     <PublishReadyToRun>false</PublishReadyToRun>
     <TieredCompilation>false</TieredCompilation>
+    <IsPackable>false</IsPackable>
   </PropertyGroup>
   <PropertyGroup>
     <ApplicationManifest>app.manifest</ApplicationManifest>

+ 8 - 8
src/Demo3/Game1.cs

@@ -114,16 +114,16 @@ namespace Demo3
 
             // create as many instances as we need from the templates
 
-            if (_Avocado == null) _Avocado = _AvodadoTemplate.DefaultModel.CreateInstance();
-            if (_HauntedHouse == null) _HauntedHouse = _HauntedHouseTemplate.DefaultModel.CreateInstance();
-            if (_BrainStem == null) _BrainStem = _BrainStemTemplate.DefaultModel.CreateInstance();
+            _Avocado ??= _AvodadoTemplate.DefaultModel.CreateInstance();
+            _HauntedHouse ??= _HauntedHouseTemplate.DefaultModel.CreateInstance();
+            _BrainStem ??= _BrainStemTemplate.DefaultModel.CreateInstance();
 
-            if (_CesiumMan1 == null) _CesiumMan1 = _CesiumManTemplate.DefaultModel.CreateInstance();
-            if (_CesiumMan2 == null) _CesiumMan2 = _CesiumManTemplate.DefaultModel.CreateInstance();
-            if (_CesiumMan3 == null) _CesiumMan3 = _CesiumManTemplate.DefaultModel.CreateInstance();
-            if (_CesiumMan4 == null) _CesiumMan4 = _CesiumManTemplate.DefaultModel.CreateInstance();
+            _CesiumMan1 ??= _CesiumManTemplate.DefaultModel.CreateInstance();
+            _CesiumMan2 ??= _CesiumManTemplate.DefaultModel.CreateInstance();
+            _CesiumMan3 ??= _CesiumManTemplate.DefaultModel.CreateInstance();
+            _CesiumMan4 ??= _CesiumManTemplate.DefaultModel.CreateInstance();
 
-            if (_Shark == null) _Shark = _SharkTemplate.DefaultModel.CreateInstance();
+            _Shark ??= _SharkTemplate.DefaultModel.CreateInstance();
 
             // animate each instance individually.
 

+ 94 - 0
src/Directory.Build.props

@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project>
+  
+  <!-- https://blog.johnnyreilly.com/2021/07/14/directory-build-props-c-sharp-9-for-all -->
+
+  <!-- Legal =================================================================================== -->
+
+  <PropertyGroup>
+    <Authors>Vicente Penades</Authors>
+    <Company>Vicente Penades</Company>
+    <Copyright>Copyright (c) 2022 Vicente Penades</Copyright>
+    <PackageLicenseExpression>MIT</PackageLicenseExpression>
+  </PropertyGroup>
+
+  <!-- Configuration =================================================================================== -->
+
+  <PropertyGroup>
+    <LangVersion>8.0</LangVersion>
+    <IsPackable>true</IsPackable>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <IsTrimmable>true</IsTrimmable>
+    <EnableTrimAnalyzer>true</EnableTrimAnalyzer>
+  </PropertyGroup>
+  
+  <!-- Analysers =================================================================================== -->
+
+  <PropertyGroup>
+    <NoWarn>1701;1702;1591;CA1062;CA1304;CA1310</NoWarn>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <!-- Enable all FxCop rules with NetAnalyzers
+    https://docs.microsoft.com/es-es/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers?view=vs-2022#migration-steps
+    -->
+    <AnalysisMode>AllEnabledByDefault</AnalysisMode>
+    <!-- <CodeAnalysisRuleSet>$(MsBuildThisFileDirectory)..\solution.ruleset</CodeAnalysisRuleSet>  -->
+  </PropertyGroup>
+
+  <ItemGroup>
+    <PackageReference Update="ErrorProne.NET.Structs" Version="0.4.0-beta.1">
+      <PrivateAssets>all</PrivateAssets>
+      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
+    </PackageReference>
+  </ItemGroup>
+  
+  <!-- Packaging =================================================================================== -->
+
+  <PropertyGroup>
+    
+    <Description>Heterogeneous collection of types for interop between third party graphics libraries</Description>
+
+    <RepositoryType>git</RepositoryType>
+    <RepositoryUrl>https://github.com/vpenades/MonoScene</RepositoryUrl>
+    <PackageProjectUrl>https://github.com/vpenades/MonoScene</PackageProjectUrl>
+
+    <PublishRepositoryUrl>true</PublishRepositoryUrl>
+
+    <PackageTags>glTF support for MonoGame</PackageTags>
+  </PropertyGroup>  
+  
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
+    <VersionPrefix>1.0.0</VersionPrefix>
+    <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <Deterministic>false</Deterministic>
+    <ContinuousIntegrationBuild>false</ContinuousIntegrationBuild>
+  </PropertyGroup>
+
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
+    <DebugSymbols>true</DebugSymbols>
+    <IncludeSymbols>true</IncludeSymbols>
+    <SymbolPackageFormat>snupkg</SymbolPackageFormat>    
+    
+    <GenerateDocumentationFile>true</GenerateDocumentationFile>
+    <DocumentationFile>bin\$(Configuration)\$(AssemblyName).xml</DocumentationFile>
+  </PropertyGroup>
+
+  <!-- Source Control =================================================================================== -->
+
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">   
+
+    <!-- https://github.com/dotnet/sourcelink/blob/main/docs/README.md -->
+    
+    <EmbedAllSources>true</EmbedAllSources>
+    <!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
+    <!--<EmbedUntrackedSources>true</EmbedUntrackedSources>-->
+    
+  </PropertyGroup>
+  
+</Project>

+ 26 - 0
src/MonoGameFramework.props

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project>
+
+  <PropertyGroup>
+    <!-- 3.8.0.1641 -->
+    <MonoGameNetStandardVersion>3.8.1.2082-develop</MonoGameNetStandardVersion>
+  </PropertyGroup>
+
+  <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
+    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="$(MonoGameNetStandardVersion)" PrivateAssets="all" />
+    <PackageReference Include="System.Memory" Version="4.5.5" />
+  </ItemGroup>
+
+  <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
+    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="$(MonoGameNetStandardVersion)" PrivateAssets="all" />
+  </ItemGroup>
+
+  <ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
+    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" PrivateAssets="all" />
+  </ItemGroup>
+
+  <ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
+    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" PrivateAssets="all" />
+  </ItemGroup>  
+
+</Project>

+ 8 - 7
src/MonoScene.Pipeline.Assimp/MonoScene.Pipeline.Assimp.csproj

@@ -1,20 +1,21 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>netstandard2.0</TargetFramework>
+    <TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
     <RootNamespace>MonoScene.Graphics.Pipeline</RootNamespace>
   </PropertyGroup>
 
+  <ItemGroup>
+    <PackageReference Include="AssimpNet" Version="5.0.0-beta1" />
+  </ItemGroup>
+
+  <Import Project="..\MonoGameFramework.props"/>
+
   <ItemGroup>
     <ProjectReference Include="..\MonoScene.Pipeline\MonoScene.Pipeline.csproj" />
     <ProjectReference Include="..\MonoScene.Runtime.Effects.Classic\MonoScene.Runtime.Effects.Classic.csproj" />
     <ProjectReference Include="..\MonoScene.Runtime.Effects.PBR\MonoScene.Runtime.Effects.PBR.csproj" />
     <ProjectReference Include="..\MonoScene.Runtime.Model3D\MonoScene.Runtime.Model3D.csproj" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <PackageReference Include="AssimpNet" Version="5.0.0-beta1" />
-    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.2082-develop" PrivateAssets="all" />    
-  </ItemGroup>
+  </ItemGroup>  
 
 </Project>

+ 1 - 1
src/MonoScene.Pipeline.GLTF/Converters.cs

@@ -41,7 +41,7 @@ namespace MonoScene.Graphics.Pipeline
         public static AffineTransform ToXna(this SharpGLTF.Transforms.AffineTransform xform)
         {
             if (xform.IsMatrix) xform = xform.GetDecomposed();
-            return new AffineTransform(xform.Scale, xform.Rotation, xform.Translation);
+            return new AffineTransform(xform.Scale.ToXNA(), xform.Rotation.ToXNA(), xform.Translation.ToXNA());
         }
 
         public static TextureAddressMode ToXna(this SharpGLTF.Schema2.TextureWrapMode mode)

+ 2 - 2
src/MonoScene.Pipeline.GLTF/Decoders/CurveDecoders.cs

@@ -11,7 +11,7 @@ namespace MonoScene.Graphics.Pipeline
         public _GltfSamplerVector3(SharpGLTF.Animations.ICurveSampler<System.Numerics.Vector3> source) { _Source = source; }
 
         private readonly SharpGLTF.Animations.ICurveSampler<System.Numerics.Vector3> _Source;
-        public Vector3 Evaluate(float offset) { return _Source.GetPoint(offset); }
+        public Vector3 Evaluate(float offset) { return _Source.GetPoint(offset).ToXNA(); }
     }
 
     readonly struct _GltfSamplerQuaternion : ICurveEvaluator<Quaternion>
@@ -19,6 +19,6 @@ namespace MonoScene.Graphics.Pipeline
         public _GltfSamplerQuaternion(SharpGLTF.Animations.ICurveSampler<System.Numerics.Quaternion> source) { _Source = source; }
 
         private readonly SharpGLTF.Animations.ICurveSampler<System.Numerics.Quaternion> _Source;
-        public Quaternion Evaluate(float offset) { return _Source.GetPoint(offset); }
+        public Quaternion Evaluate(float offset) { return _Source.GetPoint(offset).ToXNA(); }
     }
 }

+ 5 - 7
src/MonoScene.Pipeline.GLTF/Decoders/MeshDecoders.cs

@@ -4,8 +4,6 @@ using System.Linq;
 using System.Runtime.CompilerServices;
 using System.Text;
 
-using MonoScene.Graphics.Content;
-
 using XNAV2 = Microsoft.Xna.Framework.Vector2;
 using XNAV3 = Microsoft.Xna.Framework.Vector3;
 using XNAV4 = Microsoft.Xna.Framework.Vector4;
@@ -92,9 +90,9 @@ namespace MonoScene.Graphics.Pipeline
 
         #region vertex API
 
-        public XNAV3 GetPosition(int vertexIndex) { return _Source.GetPosition(vertexIndex); }
-        public XNAV3 GetNormal(int vertexIndex) { return _Source.GetNormal(vertexIndex); }
-        public XNAV4 GetTangent(int vertexIndex) { return _Source.GetTangent(vertexIndex); }
+        public XNAV3 GetPosition(int vertexIndex) { return _Source.GetPosition(vertexIndex).ToXNA(); }
+        public XNAV3 GetNormal(int vertexIndex) { return _Source.GetNormal(vertexIndex).ToXNA(); }
+        public XNAV4 GetTangent(int vertexIndex) { return _Source.GetTangent(vertexIndex).ToXNA(); }
         public VERTEXINFLUENCES GetSkinWeights(int vertexIndex)
         {
             var sparse = _Source
@@ -109,8 +107,8 @@ namespace MonoScene.Graphics.Pipeline
 
         
 
-        public XNAV4 GetColor(int vertexIndex, int colorSetIndex) { return _Source.GetColor(vertexIndex, colorSetIndex); }
-        public XNAV2 GetTextureCoord(int vertexIndex, int textureSetIndex) { return _Source.GetTextureCoord(vertexIndex, textureSetIndex); }
+        public XNAV4 GetColor(int vertexIndex, int colorSetIndex) { return _Source.GetColor(vertexIndex, colorSetIndex).ToXNA(); }
+        public XNAV2 GetTextureCoord(int vertexIndex, int textureSetIndex) { return _Source.GetTextureCoord(vertexIndex, textureSetIndex).ToXNA(); }
 
 
         public IReadOnlyList<XNAV3> GetNormalDeltas(int vertexIndex) { throw new NotImplementedException(); }

+ 2 - 2
src/MonoScene.Pipeline.GLTF/Factories/GLTFArmatureFactory.cs

@@ -42,7 +42,7 @@ namespace MonoScene.Graphics.Pipeline
 
         protected override IEnumerable<GLTFNODE> GetChildren(GLTFNODE node) { return node.VisualChildren; }
 
-        protected override XNAMAT GetLocalMatrix(GLTFNODE node) { return node.LocalMatrix; }        
+        protected override XNAMAT GetLocalMatrix(GLTFNODE node) { return node.LocalMatrix.ToXNA(); }        
 
         protected override AnimatableProperty<XNAV3> GetScale(GLTFNODE node)
         {
@@ -144,7 +144,7 @@ namespace MonoScene.Graphics.Pipeline
                 {
                     var (joint, inverseBindMatrix) = node.Skin.GetJoint(i);
 
-                    bones[i] = (joint, inverseBindMatrix);
+                    bones[i] = (joint, inverseBindMatrix.ToXNA());
                 }
 
                 return CreateSkinnedDrawableContent(node.Mesh.LogicalIndex, node, bones);

+ 8 - 7
src/MonoScene.Pipeline.GLTF/MonoScene.Pipeline.GLTF.csproj

@@ -1,20 +1,21 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>netstandard2.0</TargetFramework>
+    <TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
     <RootNamespace>MonoScene.Graphics.Pipeline</RootNamespace>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-  </PropertyGroup>  
-
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.2082-develop" PrivateAssets="all" />
-    <PackageReference Include="SharpGLTF.Core" Version="1.0.0-alpha0025" />    
+    <Compile Include="..\Shared\_Private.Numerics.cs" Link="_Private.Numerics.cs" />
   </ItemGroup>
 
+  <ItemGroup>    
+    <PackageReference Include="SharpGLTF.Core" Version="1.0.0-alpha0027" />    
+  </ItemGroup>
+
+  <Import Project="..\MonoGameFramework.props" />
+
   <ItemGroup>
     <ProjectReference Include="..\MonoScene.Pipeline\MonoScene.Pipeline.csproj" />
     <ProjectReference Include="..\MonoScene.Runtime.Model3D\MonoScene.Runtime.Model3D.csproj" />

+ 3 - 5
src/MonoScene.Pipeline/MonoScene.Pipeline.csproj

@@ -1,13 +1,11 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>netstandard2.0</TargetFramework>
+    <TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
     <RootNamespace>MonoScene.Graphics.Pipeline</RootNamespace>
-  </PropertyGroup>   
+  </PropertyGroup>
 
-  <ItemGroup>    
-    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.2082-develop" PrivateAssets="all" />
-  </ItemGroup>  
+  <Import Project="..\MonoGameFramework.props"/>  
 
   <ItemGroup>
     <ProjectReference Include="..\MonoScene.Runtime.Content\MonoScene.Runtime.Content.csproj" />

+ 3 - 8
src/MonoScene.Runtime.Content/MonoScene.Runtime.Content.csproj

@@ -1,20 +1,15 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>netstandard2.0</TargetFramework>
+    <TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
     <RootNamespace>MonoScene.Graphics.Content</RootNamespace>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>  
 
   <ItemGroup>
-    <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
-      <_Parameter1>MonoScene.Pipeline</_Parameter1>
-    </AssemblyAttribute>
+    <InternalsVisibleTo Include="MonoScene.Pipeline" />
   </ItemGroup>
 
-  <ItemGroup>
-    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.2082-develop" PrivateAssets="all" />
-    <PackageReference Include="System.Memory" Version="4.5.4" />
-  </ItemGroup>  
+  <Import Project="..\MonoGameFramework.props"/>
 
 </Project>

+ 4 - 7
src/MonoScene.Runtime.Effects.Classic/MonoScene.Runtime.Effects.Classic.csproj

@@ -1,16 +1,13 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>netstandard2.0</TargetFramework>
+    <TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
   </PropertyGroup>
 
-  <ItemGroup>
-    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.2082-develop" PrivateAssets="all" />
-    <PackageReference Include="System.Memory" Version="4.5.4" />
-  </ItemGroup>
+  <Import Project="..\MonoGameFramework.props" />
 
   <ItemGroup>
     <ProjectReference Include="..\MonoScene.Runtime.Model3D\MonoScene.Runtime.Model3D.csproj" />
   </ItemGroup>
-
+  
 </Project>

+ 4 - 6
src/MonoScene.Runtime.Effects.PBR/MonoScene.Runtime.Effects.PBR.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>netstandard2.0</TargetFramework>
+    <TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
     <RootNamespace>MonoScene.Graphics</RootNamespace>
   </PropertyGroup>
 
@@ -11,11 +11,9 @@
 
   <ItemGroup>
     <EmbeddedResource Include="Effects\Shaders\Resources\*.mgfxo" />
-  </ItemGroup>  
+  </ItemGroup>
 
-  <ItemGroup>
-    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.2082-develop" PrivateAssets="all" />    
-  </ItemGroup>  
+  <Import Project="..\MonoGameFramework.props" />
 
   <ItemGroup>
     <ProjectReference Include="..\MonoScene.Runtime.Model3D\MonoScene.Runtime.Model3D.csproj" />
@@ -95,6 +93,6 @@
 
   <ItemGroup>
     <Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
-  </ItemGroup>  
+  </ItemGroup>
 
 </Project>

+ 1 - 1
src/MonoScene.Runtime.Model3D/ModelGraph/ModelInstance.cs

@@ -245,7 +245,7 @@ namespace MonoScene.Graphics
             return new _DistanceComparer(origin);
         }
 
-        private struct _DistanceComparer : IComparer<ModelInstance>
+        private readonly struct _DistanceComparer : IComparer<ModelInstance>
         {
             public _DistanceComparer(XNAV3 origin) { _Origin = origin; }
 

+ 5 - 10
src/MonoScene.Runtime.Model3D/MonoScene.Runtime.Model3D.csproj

@@ -1,24 +1,19 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>netstandard2.0</TargetFramework>
+    <TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
     <RootNamespace>MonoScene.Graphics</RootNamespace>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-  </PropertyGroup>  
+  </PropertyGroup>
 
   <ItemGroup>
-    <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
-      <_Parameter1>MonoScene.Pipeline</_Parameter1>
-    </AssemblyAttribute>    
+    <InternalsVisibleTo Include="MonoScene.Pipeline" />
   </ItemGroup>
 
-  <ItemGroup>
-    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.2082-develop" PrivateAssets="all" />
-    <PackageReference Include="System.Memory" Version="4.5.4" />
-  </ItemGroup>
+  <Import Project="..\MonoGameFramework.props" />
 
   <ItemGroup>
     <ProjectReference Include="..\MonoScene.Runtime.Content\MonoScene.Runtime.Content.csproj" />
-  </ItemGroup>  
+  </ItemGroup>
 
 </Project>

+ 3 - 6
src/MonoScene.Runtime.Scene3D/MonoScene.Runtime.Scene3D.csproj

@@ -1,19 +1,16 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>netstandard2.0</TargetFramework>
+    <TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
     <RootNamespace>Microsoft.Xna.Framework.Graphics</RootNamespace>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>
 
-  <ItemGroup>
-    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.2082-develop" PrivateAssets="all" />
-    <PackageReference Include="System.Memory" Version="4.5.4" />
-  </ItemGroup>  
+  <Import Project="..\MonoGameFramework.props" />
 
   <ItemGroup>
     <ProjectReference Include="..\MonoScene.Runtime.Effects.Classic\MonoScene.Runtime.Effects.Classic.csproj" />
     <ProjectReference Include="..\MonoScene.Runtime.Effects.PBR\MonoScene.Runtime.Effects.PBR.csproj" />
-  </ItemGroup>
+  </ItemGroup>  
 
 </Project>

+ 5 - 19
src/MonoScene.sln

@@ -1,6 +1,6 @@
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.31019.35
+# Visual Studio Version 17
+VisualStudioVersion = 17.2.32526.322
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Pipeline", "Pipeline", "{B8E244DA-E11E-4E86-A247-220C1AE236BF}"
 EndProject
@@ -22,10 +22,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Demo3", "Demo3\Demo3.csproj
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonoScene.Pipeline.Assimp", "MonoScene.Pipeline.Assimp\MonoScene.Pipeline.Assimp.csproj", "{53F32A7E-EA67-408E-92FC-D6B3D46AC9B1}"
 EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonoSceneViewer", "MonoSceneViewer\MonoSceneViewer.csproj", "{5CA89BF6-7EF0-4DAF-81F1-0534C56136BF}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AndroidDemo1", "AndroidDemo1\AndroidDemo1.csproj", "{9CE794E3-3DEC-491B-8AFB-28833107D8A8}"
-EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonoScene.Pipeline", "MonoScene.Pipeline\MonoScene.Pipeline.csproj", "{BF0082A1-44BE-45B6-8679-BD22E5899050}"
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Demos", "Demos", "{891DFE27-C481-4D2C-9F55-91CFC08635DF}"
@@ -34,10 +30,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Runtime", "Runtime", "{C5BB
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F0B1912B-E726-4B4E-8FF5-5ADC7FC18824}"
 	ProjectSection(SolutionItems) = preProject
+		Directory.Build.props = Directory.Build.props
+		MonoGameFramework.props = MonoGameFramework.props
 		..\README.md = ..\README.md
 	EndProjectSection
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoScene.Runtime.Effects.Classic", "MonoScene.Runtime.Effects.Classic\MonoScene.Runtime.Effects.Classic.csproj", "{691C5DFC-9041-4406-9459-B83AFD5FBAD2}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonoScene.Runtime.Effects.Classic", "MonoScene.Runtime.Effects.Classic\MonoScene.Runtime.Effects.Classic.csproj", "{691C5DFC-9041-4406-9459-B83AFD5FBAD2}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -81,16 +79,6 @@ Global
 		{53F32A7E-EA67-408E-92FC-D6B3D46AC9B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{53F32A7E-EA67-408E-92FC-D6B3D46AC9B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{53F32A7E-EA67-408E-92FC-D6B3D46AC9B1}.Release|Any CPU.Build.0 = Release|Any CPU
-		{5CA89BF6-7EF0-4DAF-81F1-0534C56136BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{5CA89BF6-7EF0-4DAF-81F1-0534C56136BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{5CA89BF6-7EF0-4DAF-81F1-0534C56136BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{5CA89BF6-7EF0-4DAF-81F1-0534C56136BF}.Release|Any CPU.Build.0 = Release|Any CPU
-		{9CE794E3-3DEC-491B-8AFB-28833107D8A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{9CE794E3-3DEC-491B-8AFB-28833107D8A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{9CE794E3-3DEC-491B-8AFB-28833107D8A8}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
-		{9CE794E3-3DEC-491B-8AFB-28833107D8A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{9CE794E3-3DEC-491B-8AFB-28833107D8A8}.Release|Any CPU.Build.0 = Release|Any CPU
-		{9CE794E3-3DEC-491B-8AFB-28833107D8A8}.Release|Any CPU.Deploy.0 = Release|Any CPU
 		{BF0082A1-44BE-45B6-8679-BD22E5899050}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{BF0082A1-44BE-45B6-8679-BD22E5899050}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{BF0082A1-44BE-45B6-8679-BD22E5899050}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -113,8 +101,6 @@ Global
 		{B3D0B09B-1DF1-49CB-B84F-6047C49550CC} = {891DFE27-C481-4D2C-9F55-91CFC08635DF}
 		{C8D978C4-BEC8-4FB3-9B00-1490A13A5779} = {891DFE27-C481-4D2C-9F55-91CFC08635DF}
 		{53F32A7E-EA67-408E-92FC-D6B3D46AC9B1} = {B8E244DA-E11E-4E86-A247-220C1AE236BF}
-		{5CA89BF6-7EF0-4DAF-81F1-0534C56136BF} = {891DFE27-C481-4D2C-9F55-91CFC08635DF}
-		{9CE794E3-3DEC-491B-8AFB-28833107D8A8} = {891DFE27-C481-4D2C-9F55-91CFC08635DF}
 		{BF0082A1-44BE-45B6-8679-BD22E5899050} = {B8E244DA-E11E-4E86-A247-220C1AE236BF}
 		{691C5DFC-9041-4406-9459-B83AFD5FBAD2} = {C5BB2248-5C6A-4895-BE07-F9A53D566E9B}
 	EndGlobalSection

+ 1 - 1
src/MonoSceneViewer/MainScene.cs

@@ -69,7 +69,7 @@ namespace MonoGameViewer
 
                 if (fp.EndsWith(".zip"))
                 {
-                    _Model = SharpGLTF.IO.ZipReader.LoadGltf2(filePath, ValidationMode.TryFix);
+                    _Model = SharpGLTF.IO.ZipReader.LoadModelFromZip(filePath, ValidationMode.TryFix);
                     _IsAssimp = false;
                 }
                 else if (fp.EndsWith(".glb") || fp.EndsWith(".gltf"))

+ 2 - 2
src/MonoSceneViewer/MonoSceneViewer.csproj

@@ -4,19 +4,19 @@
     <OutputType>WinExe</OutputType>
     <TargetFramework>net6.0-windows</TargetFramework>
     <UseWPF>true</UseWPF>
+    <IsPackable>false</IsPackable>
   </PropertyGroup>
 
   <ItemGroup>
     <PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.1.2082-develop" />
     <PackageReference Include="PropertyTools.Wpf" Version="3.1.0" />
-    <PackageReference Include="SharpGLTF.Toolkit" Version="1.0.0-alpha0025" />    
+    <PackageReference Include="SharpGLTF.Toolkit" Version="1.0.0-alpha0026" />    
   </ItemGroup>
 
   <ItemGroup>
     <ProjectReference Include="..\MonoScene.Pipeline.GLTF\MonoScene.Pipeline.GLTF.csproj" />
     <ProjectReference Include="..\MonoScene.Pipeline.Assimp\MonoScene.Pipeline.Assimp.csproj" />
     <ProjectReference Include="..\MonoScene.Runtime.Scene3D\MonoScene.Runtime.Scene3D.csproj" />
-
   </ItemGroup>
 
 

+ 1 - 1
src/NuGet.config

@@ -3,7 +3,7 @@
 
   <packageSources>
 
-    <add key="MonoGame Develop" value="http://teamcity.monogame.net/guestAuth/app/nuget/feed/_Root/default/v3/index.json" />
+    <add key="MonoGame Develop" value="..\MonoGame" />
 
   </packageSources>  
 

+ 37 - 0
src/Shared/_Private.Numerics.cs

@@ -0,0 +1,37 @@
+
+
+using SYSV2 = System.Numerics.Vector2;
+using SYSV3 = System.Numerics.Vector3;
+using SYSV4 = System.Numerics.Vector4;
+using SYSQ4 = System.Numerics.Quaternion;
+using SYSM4X4 = System.Numerics.Matrix4x4;
+
+using XNAV2 = Microsoft.Xna.Framework.Vector2;
+using XNAV3 = Microsoft.Xna.Framework.Vector3;
+using XNAV4 = Microsoft.Xna.Framework.Vector4;
+using XNAQ4 = Microsoft.Xna.Framework.Quaternion;
+using XNAM4X4 = Microsoft.Xna.Framework.Matrix;
+
+
+
+namespace System
+{
+    internal static partial class _PrivateExtensions
+    {
+        public static XNAV2 ToXNA(this SYSV2 value) { return new XNAV2(value.X, value.Y); }
+        public static XNAV3 ToXNA(this SYSV3 value) { return new XNAV3(value.X, value.Y, value.Z); }
+        public static XNAV4 ToXNA(this SYSV4 value) { return new XNAV4(value.X, value.Y, value.Z, value.W); }
+        public static XNAQ4 ToXNA(this SYSQ4 value) { return new XNAQ4(value.X, value.Y, value.Z, value.W); }
+
+        public static XNAM4X4 ToXNA(this SYSM4X4 value)
+        {
+            return new XNAM4X4
+                (
+                value.M11, value.M12, value.M13, value.M14,
+                value.M21, value.M22, value.M23, value.M24,
+                value.M31, value.M32, value.M33, value.M34,
+                value.M41, value.M42, value.M43, value.M44
+                );
+        }
+    }
+}

+ 23 - 0
src/build-preview.cmd

@@ -0,0 +1,23 @@
+@echo off
+
+:: ============================================= Define Version suffix
+
+set GETTIMEKEY=powershell get-date -format "{yyyyMMdd-HHmm}"
+for /f %%i in ('%GETTIMEKEY%') do set TIMEKEY=%%i
+
+set VERSIONSUFFIX=Preview-%TIMEKEY%
+
+echo Building 1.0.0-%VERSIONSUFFIX%
+
+:: ============================================= DOTNET builder
+
+dotnet build -c:Release --version-suffix %VERSIONSUFFIX% MonoScene.sln
+
+:: ============================================= Copy output
+
+md bin
+
+for /r %%i in (*.*nupkg) do move %%i bin
+
+pause
+exit /b