diff --git a/Examples/Complete/PointCloudPotree2/Core/Fusee.Examples.PointCloudPotree2.Core.csproj b/Examples/Complete/PointCloudPotree2/Core/Fusee.Examples.PointCloudPotree2.Core.csproj index 146556704..0dade75fb 100644 --- a/Examples/Complete/PointCloudPotree2/Core/Fusee.Examples.PointCloudPotree2.Core.csproj +++ b/Examples/Complete/PointCloudPotree2/Core/Fusee.Examples.PointCloudPotree2.Core.csproj @@ -2,6 +2,7 @@ net7.0 $(BaseOutputPath)\Examples\PointCloudPotree2\Core\ + AnyCPU;x64 diff --git a/Examples/Complete/PointCloudPotree2/Core/PointCloudPotree2.cs b/Examples/Complete/PointCloudPotree2/Core/PointCloudPotree2.cs index d9774fcf3..705fd015f 100644 --- a/Examples/Complete/PointCloudPotree2/Core/PointCloudPotree2.cs +++ b/Examples/Complete/PointCloudPotree2/Core/PointCloudPotree2.cs @@ -1,5 +1,6 @@ using Fusee.Engine.Common; using Fusee.Engine.Core; +using Fusee.Engine.Core.Scene; using Fusee.PointCloud.Common; namespace Fusee.Examples.PointCloudPotree2.Core @@ -22,9 +23,30 @@ public bool ClosingRequested private PointCloudPotree2Core _pointRenderingCore; - public PointCloudPotree2() + // Changed for SLIRP + public Camera MainCamera => _pointRenderingCore?.MainCamera; + public Transform MainCameraTransform => _pointRenderingCore?.MainCameraTransform; + public SceneNode MainCameraSceneNode => _pointRenderingCore?.MainCameraNode; + public PointCloudPotree2Core Core => _pointRenderingCore; + + public bool RenderToTexture + { + get => _pointRenderingCore?.RenderToTexture ?? false; + set + { + if (_pointRenderingCore != null) _pointRenderingCore.RenderToTexture = value; + } + } + + public WritableTexture CurRenderTexture { + get => _pointRenderingCore.RenderTexture; + set => _pointRenderingCore.RenderTexture = value; + } + public PointCloudPotree2() + { + } public override void Init() @@ -32,6 +54,8 @@ public override void Init() VSync = false; _pointRenderingCore = new PointCloudPotree2Core(RC) { + // SLIRP + // RenderToTexture = true RenderToTexture = false }; diff --git a/Examples/Complete/PointCloudPotree2/Core/PointCloudPotree2Core.cs b/Examples/Complete/PointCloudPotree2/Core/PointCloudPotree2Core.cs index 98bca57ab..563b501a3 100644 --- a/Examples/Complete/PointCloudPotree2/Core/PointCloudPotree2Core.cs +++ b/Examples/Complete/PointCloudPotree2/Core/PointCloudPotree2Core.cs @@ -1,4 +1,5 @@ using Fusee.Base.Common; +using Fusee.Engine.Common; using Fusee.Engine.Core; using Fusee.Engine.Core.Scene; using Fusee.Math.Core; @@ -15,7 +16,12 @@ public class PointCloudPotree2Core { public bool RenderToTexture { get; set; } - public WritableTexture RenderTexture { get; private set; } + public WritableTexture RenderTexture + { + get; + // SLIRP + set; + } public bool ClosingRequested { @@ -52,6 +58,11 @@ public bool ClosingRequested private readonly RenderContext _rc; + //Expose camera to use it in SLIRP + public Camera MainCamera => _cam; + public Transform MainCameraTransform => _camTransform; + public SceneNode MainCameraNode => _camNode; + public void OnLoadNewFile(object sender, EventArgs e) { var path = PointRenderingParams.Instance.PathToOocFile; @@ -111,8 +122,9 @@ public void Init() _cam = new(ProjectionMethod.Perspective, ZNear, ZFar, _fovy) { - BackgroundColor = float4.One, - RenderTexture = RenderTexture + //SLIRP + BackgroundColor = float4.Zero, + //RenderTexture = RenderTexture }; _camNode = new SceneNode() @@ -199,6 +211,9 @@ public void Update(bool allowInput) OocLoader.IsUserMoving = false;*/ //-------------------------------------------------------------------------------------------- + // SLIRP + // in SLIRP we take the input from the SLIRP Client + /* // Mouse and keyboard movement if (Input.Keyboard.LeftRightAxis != 0 || Input.Keyboard.UpDownAxis != 0) _keys = true; @@ -225,8 +240,10 @@ public void Update(bool allowInput) _angleVert += _angleVelVert; _angleVelHorz = 0; _angleVelVert = 0; - + _camTransform.FpsView(_angleHorz, _angleVert, Input.Keyboard.WSAxis, Input.Keyboard.ADAxis, Time.DeltaTimeUpdate * 20); + ´*/ + } private void OnThresholdChanged(int newValue) diff --git a/Examples/Complete/PointCloudPotree2/Core/PointRenderParams.cs b/Examples/Complete/PointCloudPotree2/Core/PointRenderParams.cs index c69eaa1fc..9a0173ad7 100644 --- a/Examples/Complete/PointCloudPotree2/Core/PointRenderParams.cs +++ b/Examples/Complete/PointCloudPotree2/Core/PointRenderParams.cs @@ -15,7 +15,7 @@ public sealed class PointRenderingParams public PointThresholdHandler PointThresholdHandler; public ProjectedSizeModifierHandler ProjectedSizeModifierHandler; - public string PathToOocFile = Path.Combine("Assets", "Cube1030301", "Potree"); + public string PathToOocFile = Path.Combine("Assets", "Rose", "Potree"); public ShaderEffect DepthPassEf; public SurfaceEffectPointCloud ColorPassEf; diff --git a/Fusee.sln b/Fusee.sln index 0803971ea..272da6a72 100644 --- a/Fusee.sln +++ b/Fusee.sln @@ -302,6 +302,53 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ImGui", "ImGui", "{D1853E25 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Fusee.Examples.PointCloudPotree2.Gui", "Examples\Complete\PointCloudPotree2\ImGui\Fusee.Examples.PointCloudPotree2.Gui.csproj", "{DF33EBD9-9CD9-409C-A10F-AC6FA8FA851D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SLIRP", "SLIRP", "{EC28C91A-2067-494C-BE18-B2057BBB6516}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SLIRP", "SLIRP", "{C8163C6A-2273-4FEF-A426-D908451BC776}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Fusee.Tests.SLIRP.SLIRPTest", "src\Tests\SLIRP\SLIRPTest\Fusee.Tests.SLIRP.SLIRPTest.csproj", "{2D40C8B1-DA7B-45C5-B841-1CED3245CC40}" + ProjectSection(ProjectDependencies) = postProject + {1B99F3FD-C685-4D72-8EBA-94A1214469B5} = {1B99F3FD-C685-4D72-8EBA-94A1214469B5} + {28C06484-229D-44C6-B463-C29762D586BD} = {28C06484-229D-44C6-B463-C29762D586BD} + {5906ABE0-1D62-4F9A-9ABA-B7D301615BB0} = {5906ABE0-1D62-4F9A-9ABA-B7D301615BB0} + {72974011-C264-4D3D-979A-A4E750C5787A} = {72974011-C264-4D3D-979A-A4E750C5787A} + {76FE409A-DCA8-4714-8E95-4FE189751EE7} = {76FE409A-DCA8-4714-8E95-4FE189751EE7} + {7DC4C82A-CBE1-4564-9B62-733545DB892B} = {7DC4C82A-CBE1-4564-9B62-733545DB892B} + {7E0C9336-7A38-4C87-97E2-A8D2A90AA29D} = {7E0C9336-7A38-4C87-97E2-A8D2A90AA29D} + {F28634E7-52B8-4935-B19E-CB8A6844E6F1} = {F28634E7-52B8-4935-B19E-CB8A6844E6F1} + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Fusee.SLIRP.Desktop", "src\SLIRP\Core\Fusee.SLIRP.Desktop.csproj", "{070A34B2-E8E2-498E-B472-677E28A057BB}" + ProjectSection(ProjectDependencies) = postProject + {5906ABE0-1D62-4F9A-9ABA-B7D301615BB0} = {5906ABE0-1D62-4F9A-9ABA-B7D301615BB0} + {7E0C9336-7A38-4C87-97E2-A8D2A90AA29D} = {7E0C9336-7A38-4C87-97E2-A8D2A90AA29D} + {DFD770F6-4222-4255-AAE0-DCACDC7B21EB} = {DFD770F6-4222-4255-AAE0-DCACDC7B21EB} + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Fusee.SLIRP.Common", "src\SLIRP\Common\Fusee.SLIRP.Common.csproj", "{17E70A4F-1E6C-496F-ACC8-00FA29C199BB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Fusee.SLIRP.DataTransformation", "src\SLIRP\DataTransformation\Fusee.SLIRP.DataTransformation\Fusee.SLIRP.DataTransformation.csproj", "{0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Fusee.SLIRP.Network.Server.Core", "src\SLIRP\Network\Fusee.SLIRP.Network\Fusee.SLIRP.Network.Server.Core.csproj", "{1D85235B-44A2-4E0C-B6D5-699C902EFEB0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Fusee.SLIRP.Network.Common", "src\SLIRP\Network\Common\Fusee.SLIRP.Network.Common\Fusee.SLIRP.Network.Common.csproj", "{DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fusee.SLIRP.Network.RenderServer", "src\SLIRP\Network\Fusee.SLIRP.Network.RenderServer\Fusee.SLIRP.Network.RenderServer.csproj", "{B902C801-1BC6-4054-976F-099E0571ABC6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fusee.SLIRP.Network.Client.Core", "src\SLIRP\Network\Client\Fusee.SLIRP.Network.Client\Fusee.SLIRP.Network.Client.Core.csproj", "{B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Network", "Network", "{9A397829-D9DE-4D77-9348-4D301E841F63}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fusee.SLIRP.Network.Server.Common", "src\SLIRP\Network\Server\Common\Fusee.SLIRP.Network.Server.Common\Fusee.SLIRP.Network.Server.Common.csproj", "{D1A6CC87-12D7-44CF-800A-A82AB27425F1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Server", "Server", "{797820E5-77CF-4B31-85F1-08FEA6555951}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{176B5BD9-DFAB-4FAF-BE61-067124AEC79B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fusee.SLIRP.Network.Client.Common", "src\SLIRP\Network\Client\Common\Fusee.SLIRP.Network.Client.Common\Fusee.SLIRP.Network.Client.Common.csproj", "{814616B6-04D3-47BB-8BFE-92D1063E558D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fusee.SLIRP.Network.Server.Examples", "src\SLIRP\Network\Server\Examples\Fusee.SLIRP.Network.Server.Examples\Fusee.SLIRP.Network.Server.Examples.csproj", "{6BAB1317-AF97-4CFD-806C-98D8510A95E3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1702,6 +1749,15 @@ Global {3AFEF2ED-6325-4C11-9B87-A32514FD5AE1}.Release-Blazor|Any CPU.Build.0 = Release|Any CPU {3AFEF2ED-6325-4C11-9B87-A32514FD5AE1}.Release-Desktop|Any CPU.ActiveCfg = Release|Any CPU {3AFEF2ED-6325-4C11-9B87-A32514FD5AE1}.Release-NuGet|Any CPU.ActiveCfg = Release|Any CPU + {7638E21E-193F-4AC7-8F01-B595FE8B3CAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7638E21E-193F-4AC7-8F01-B595FE8B3CAA}.Debug-Android|Any CPU.ActiveCfg = Debug|Any CPU + {7638E21E-193F-4AC7-8F01-B595FE8B3CAA}.Debug-Blazor|Any CPU.ActiveCfg = Debug|Any CPU + {7638E21E-193F-4AC7-8F01-B595FE8B3CAA}.Debug-Desktop|Any CPU.ActiveCfg = Debug|Any CPU + {7638E21E-193F-4AC7-8F01-B595FE8B3CAA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7638E21E-193F-4AC7-8F01-B595FE8B3CAA}.Release-Android|Any CPU.ActiveCfg = Release|Any CPU + {7638E21E-193F-4AC7-8F01-B595FE8B3CAA}.Release-Blazor|Any CPU.ActiveCfg = Release|Any CPU + {7638E21E-193F-4AC7-8F01-B595FE8B3CAA}.Release-Desktop|Any CPU.ActiveCfg = Release|Any CPU + {7638E21E-193F-4AC7-8F01-B595FE8B3CAA}.Release-NuGet|Any CPU.ActiveCfg = Release|Any CPU {4BA48469-D4D3-4562-B1E7-FB4F522D3F00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4BA48469-D4D3-4562-B1E7-FB4F522D3F00}.Debug|Any CPU.Build.0 = Debug|Any CPU {4BA48469-D4D3-4562-B1E7-FB4F522D3F00}.Debug-Android|Any CPU.ActiveCfg = Debug|Any CPU @@ -1742,6 +1798,204 @@ Global {DF33EBD9-9CD9-409C-A10F-AC6FA8FA851D}.Release-Desktop|Any CPU.ActiveCfg = Release|Any CPU {DF33EBD9-9CD9-409C-A10F-AC6FA8FA851D}.Release-Desktop|Any CPU.Build.0 = Release|Any CPU {DF33EBD9-9CD9-409C-A10F-AC6FA8FA851D}.Release-NuGet|Any CPU.ActiveCfg = Release|Any CPU + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40}.Debug-Android|Any CPU.ActiveCfg = Debug|Any CPU + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40}.Debug-Android|Any CPU.Build.0 = Debug|Any CPU + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40}.Debug-Blazor|Any CPU.ActiveCfg = Debug|Any CPU + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40}.Debug-Blazor|Any CPU.Build.0 = Debug|Any CPU + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40}.Debug-Desktop|Any CPU.ActiveCfg = Debug|Any CPU + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40}.Debug-Desktop|Any CPU.Build.0 = Debug|Any CPU + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40}.Release|Any CPU.Build.0 = Release|Any CPU + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40}.Release-Android|Any CPU.ActiveCfg = Release|Any CPU + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40}.Release-Android|Any CPU.Build.0 = Release|Any CPU + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40}.Release-Blazor|Any CPU.ActiveCfg = Release|Any CPU + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40}.Release-Blazor|Any CPU.Build.0 = Release|Any CPU + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40}.Release-Desktop|Any CPU.ActiveCfg = Release|Any CPU + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40}.Release-Desktop|Any CPU.Build.0 = Release|Any CPU + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40}.Release-NuGet|Any CPU.ActiveCfg = Release|Any CPU + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40}.Release-NuGet|Any CPU.Build.0 = Release|Any CPU + {070A34B2-E8E2-498E-B472-677E28A057BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {070A34B2-E8E2-498E-B472-677E28A057BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {070A34B2-E8E2-498E-B472-677E28A057BB}.Debug-Android|Any CPU.ActiveCfg = Debug|Any CPU + {070A34B2-E8E2-498E-B472-677E28A057BB}.Debug-Android|Any CPU.Build.0 = Debug|Any CPU + {070A34B2-E8E2-498E-B472-677E28A057BB}.Debug-Blazor|Any CPU.ActiveCfg = Debug|Any CPU + {070A34B2-E8E2-498E-B472-677E28A057BB}.Debug-Blazor|Any CPU.Build.0 = Debug|Any CPU + {070A34B2-E8E2-498E-B472-677E28A057BB}.Debug-Desktop|Any CPU.ActiveCfg = Debug|Any CPU + {070A34B2-E8E2-498E-B472-677E28A057BB}.Debug-Desktop|Any CPU.Build.0 = Debug|Any CPU + {070A34B2-E8E2-498E-B472-677E28A057BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {070A34B2-E8E2-498E-B472-677E28A057BB}.Release|Any CPU.Build.0 = Release|Any CPU + {070A34B2-E8E2-498E-B472-677E28A057BB}.Release-Android|Any CPU.ActiveCfg = Release|Any CPU + {070A34B2-E8E2-498E-B472-677E28A057BB}.Release-Android|Any CPU.Build.0 = Release|Any CPU + {070A34B2-E8E2-498E-B472-677E28A057BB}.Release-Blazor|Any CPU.ActiveCfg = Release|Any CPU + {070A34B2-E8E2-498E-B472-677E28A057BB}.Release-Blazor|Any CPU.Build.0 = Release|Any CPU + {070A34B2-E8E2-498E-B472-677E28A057BB}.Release-Desktop|Any CPU.ActiveCfg = Release|Any CPU + {070A34B2-E8E2-498E-B472-677E28A057BB}.Release-Desktop|Any CPU.Build.0 = Release|Any CPU + {070A34B2-E8E2-498E-B472-677E28A057BB}.Release-NuGet|Any CPU.ActiveCfg = Release|Any CPU + {070A34B2-E8E2-498E-B472-677E28A057BB}.Release-NuGet|Any CPU.Build.0 = Release|Any CPU + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB}.Debug-Android|Any CPU.ActiveCfg = Debug|Any CPU + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB}.Debug-Android|Any CPU.Build.0 = Debug|Any CPU + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB}.Debug-Blazor|Any CPU.ActiveCfg = Debug|Any CPU + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB}.Debug-Blazor|Any CPU.Build.0 = Debug|Any CPU + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB}.Debug-Desktop|Any CPU.ActiveCfg = Debug|Any CPU + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB}.Debug-Desktop|Any CPU.Build.0 = Debug|Any CPU + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB}.Release|Any CPU.Build.0 = Release|Any CPU + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB}.Release-Android|Any CPU.ActiveCfg = Release|Any CPU + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB}.Release-Android|Any CPU.Build.0 = Release|Any CPU + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB}.Release-Blazor|Any CPU.ActiveCfg = Release|Any CPU + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB}.Release-Blazor|Any CPU.Build.0 = Release|Any CPU + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB}.Release-Desktop|Any CPU.ActiveCfg = Release|Any CPU + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB}.Release-Desktop|Any CPU.Build.0 = Release|Any CPU + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB}.Release-NuGet|Any CPU.ActiveCfg = Release|Any CPU + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB}.Release-NuGet|Any CPU.Build.0 = Release|Any CPU + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}.Debug-Android|Any CPU.ActiveCfg = Debug|Any CPU + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}.Debug-Android|Any CPU.Build.0 = Debug|Any CPU + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}.Debug-Blazor|Any CPU.ActiveCfg = Debug|Any CPU + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}.Debug-Blazor|Any CPU.Build.0 = Debug|Any CPU + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}.Debug-Desktop|Any CPU.ActiveCfg = Debug|Any CPU + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}.Debug-Desktop|Any CPU.Build.0 = Debug|Any CPU + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}.Release|Any CPU.Build.0 = Release|Any CPU + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}.Release-Android|Any CPU.ActiveCfg = Release|Any CPU + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}.Release-Android|Any CPU.Build.0 = Release|Any CPU + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}.Release-Blazor|Any CPU.ActiveCfg = Release|Any CPU + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}.Release-Blazor|Any CPU.Build.0 = Release|Any CPU + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}.Release-Desktop|Any CPU.ActiveCfg = Release|Any CPU + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}.Release-Desktop|Any CPU.Build.0 = Release|Any CPU + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}.Release-NuGet|Any CPU.ActiveCfg = Release|Any CPU + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366}.Release-NuGet|Any CPU.Build.0 = Release|Any CPU + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0}.Debug-Android|Any CPU.ActiveCfg = Debug|Any CPU + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0}.Debug-Android|Any CPU.Build.0 = Debug|Any CPU + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0}.Debug-Blazor|Any CPU.ActiveCfg = Debug|Any CPU + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0}.Debug-Blazor|Any CPU.Build.0 = Debug|Any CPU + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0}.Debug-Desktop|Any CPU.ActiveCfg = Debug|Any CPU + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0}.Debug-Desktop|Any CPU.Build.0 = Debug|Any CPU + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0}.Release|Any CPU.Build.0 = Release|Any CPU + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0}.Release-Android|Any CPU.ActiveCfg = Release|Any CPU + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0}.Release-Android|Any CPU.Build.0 = Release|Any CPU + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0}.Release-Blazor|Any CPU.ActiveCfg = Release|Any CPU + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0}.Release-Blazor|Any CPU.Build.0 = Release|Any CPU + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0}.Release-Desktop|Any CPU.ActiveCfg = Release|Any CPU + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0}.Release-Desktop|Any CPU.Build.0 = Release|Any CPU + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0}.Release-NuGet|Any CPU.ActiveCfg = Release|Any CPU + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0}.Release-NuGet|Any CPU.Build.0 = Release|Any CPU + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}.Debug-Android|Any CPU.ActiveCfg = Debug|Any CPU + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}.Debug-Android|Any CPU.Build.0 = Debug|Any CPU + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}.Debug-Blazor|Any CPU.ActiveCfg = Debug|Any CPU + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}.Debug-Blazor|Any CPU.Build.0 = Debug|Any CPU + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}.Debug-Desktop|Any CPU.ActiveCfg = Debug|Any CPU + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}.Debug-Desktop|Any CPU.Build.0 = Debug|Any CPU + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}.Release|Any CPU.Build.0 = Release|Any CPU + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}.Release-Android|Any CPU.ActiveCfg = Release|Any CPU + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}.Release-Android|Any CPU.Build.0 = Release|Any CPU + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}.Release-Blazor|Any CPU.ActiveCfg = Release|Any CPU + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}.Release-Blazor|Any CPU.Build.0 = Release|Any CPU + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}.Release-Desktop|Any CPU.ActiveCfg = Release|Any CPU + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}.Release-Desktop|Any CPU.Build.0 = Release|Any CPU + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}.Release-NuGet|Any CPU.ActiveCfg = Release|Any CPU + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C}.Release-NuGet|Any CPU.Build.0 = Release|Any CPU + {B902C801-1BC6-4054-976F-099E0571ABC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B902C801-1BC6-4054-976F-099E0571ABC6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B902C801-1BC6-4054-976F-099E0571ABC6}.Debug-Android|Any CPU.ActiveCfg = Debug|Any CPU + {B902C801-1BC6-4054-976F-099E0571ABC6}.Debug-Android|Any CPU.Build.0 = Debug|Any CPU + {B902C801-1BC6-4054-976F-099E0571ABC6}.Debug-Blazor|Any CPU.ActiveCfg = Debug|Any CPU + {B902C801-1BC6-4054-976F-099E0571ABC6}.Debug-Blazor|Any CPU.Build.0 = Debug|Any CPU + {B902C801-1BC6-4054-976F-099E0571ABC6}.Debug-Desktop|Any CPU.ActiveCfg = Debug|Any CPU + {B902C801-1BC6-4054-976F-099E0571ABC6}.Debug-Desktop|Any CPU.Build.0 = Debug|Any CPU + {B902C801-1BC6-4054-976F-099E0571ABC6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B902C801-1BC6-4054-976F-099E0571ABC6}.Release|Any CPU.Build.0 = Release|Any CPU + {B902C801-1BC6-4054-976F-099E0571ABC6}.Release-Android|Any CPU.ActiveCfg = Release|Any CPU + {B902C801-1BC6-4054-976F-099E0571ABC6}.Release-Android|Any CPU.Build.0 = Release|Any CPU + {B902C801-1BC6-4054-976F-099E0571ABC6}.Release-Blazor|Any CPU.ActiveCfg = Release|Any CPU + {B902C801-1BC6-4054-976F-099E0571ABC6}.Release-Blazor|Any CPU.Build.0 = Release|Any CPU + {B902C801-1BC6-4054-976F-099E0571ABC6}.Release-Desktop|Any CPU.ActiveCfg = Release|Any CPU + {B902C801-1BC6-4054-976F-099E0571ABC6}.Release-Desktop|Any CPU.Build.0 = Release|Any CPU + {B902C801-1BC6-4054-976F-099E0571ABC6}.Release-NuGet|Any CPU.ActiveCfg = Release|Any CPU + {B902C801-1BC6-4054-976F-099E0571ABC6}.Release-NuGet|Any CPU.Build.0 = Release|Any CPU + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}.Debug-Android|Any CPU.ActiveCfg = Debug|Any CPU + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}.Debug-Android|Any CPU.Build.0 = Debug|Any CPU + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}.Debug-Blazor|Any CPU.ActiveCfg = Debug|Any CPU + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}.Debug-Blazor|Any CPU.Build.0 = Debug|Any CPU + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}.Debug-Desktop|Any CPU.ActiveCfg = Debug|Any CPU + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}.Debug-Desktop|Any CPU.Build.0 = Debug|Any CPU + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}.Release|Any CPU.Build.0 = Release|Any CPU + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}.Release-Android|Any CPU.ActiveCfg = Release|Any CPU + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}.Release-Android|Any CPU.Build.0 = Release|Any CPU + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}.Release-Blazor|Any CPU.ActiveCfg = Release|Any CPU + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}.Release-Blazor|Any CPU.Build.0 = Release|Any CPU + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}.Release-Desktop|Any CPU.ActiveCfg = Release|Any CPU + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}.Release-Desktop|Any CPU.Build.0 = Release|Any CPU + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}.Release-NuGet|Any CPU.ActiveCfg = Release|Any CPU + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08}.Release-NuGet|Any CPU.Build.0 = Release|Any CPU + {D1A6CC87-12D7-44CF-800A-A82AB27425F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D1A6CC87-12D7-44CF-800A-A82AB27425F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D1A6CC87-12D7-44CF-800A-A82AB27425F1}.Debug-Android|Any CPU.ActiveCfg = Debug|Any CPU + {D1A6CC87-12D7-44CF-800A-A82AB27425F1}.Debug-Android|Any CPU.Build.0 = Debug|Any CPU + {D1A6CC87-12D7-44CF-800A-A82AB27425F1}.Debug-Blazor|Any CPU.ActiveCfg = Debug|Any CPU + {D1A6CC87-12D7-44CF-800A-A82AB27425F1}.Debug-Blazor|Any CPU.Build.0 = Debug|Any CPU + {D1A6CC87-12D7-44CF-800A-A82AB27425F1}.Debug-Desktop|Any CPU.ActiveCfg = Debug|Any CPU + {D1A6CC87-12D7-44CF-800A-A82AB27425F1}.Debug-Desktop|Any CPU.Build.0 = Debug|Any CPU + {D1A6CC87-12D7-44CF-800A-A82AB27425F1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D1A6CC87-12D7-44CF-800A-A82AB27425F1}.Release|Any CPU.Build.0 = Release|Any CPU + {D1A6CC87-12D7-44CF-800A-A82AB27425F1}.Release-Android|Any CPU.ActiveCfg = Release|Any CPU + {D1A6CC87-12D7-44CF-800A-A82AB27425F1}.Release-Android|Any CPU.Build.0 = Release|Any CPU + {D1A6CC87-12D7-44CF-800A-A82AB27425F1}.Release-Blazor|Any CPU.ActiveCfg = Release|Any CPU + {D1A6CC87-12D7-44CF-800A-A82AB27425F1}.Release-Blazor|Any CPU.Build.0 = Release|Any CPU + {D1A6CC87-12D7-44CF-800A-A82AB27425F1}.Release-Desktop|Any CPU.ActiveCfg = Release|Any CPU + {D1A6CC87-12D7-44CF-800A-A82AB27425F1}.Release-Desktop|Any CPU.Build.0 = Release|Any CPU + {D1A6CC87-12D7-44CF-800A-A82AB27425F1}.Release-NuGet|Any CPU.ActiveCfg = Release|Any CPU + {D1A6CC87-12D7-44CF-800A-A82AB27425F1}.Release-NuGet|Any CPU.Build.0 = Release|Any CPU + {814616B6-04D3-47BB-8BFE-92D1063E558D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {814616B6-04D3-47BB-8BFE-92D1063E558D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {814616B6-04D3-47BB-8BFE-92D1063E558D}.Debug-Android|Any CPU.ActiveCfg = Debug|Any CPU + {814616B6-04D3-47BB-8BFE-92D1063E558D}.Debug-Android|Any CPU.Build.0 = Debug|Any CPU + {814616B6-04D3-47BB-8BFE-92D1063E558D}.Debug-Blazor|Any CPU.ActiveCfg = Debug|Any CPU + {814616B6-04D3-47BB-8BFE-92D1063E558D}.Debug-Blazor|Any CPU.Build.0 = Debug|Any CPU + {814616B6-04D3-47BB-8BFE-92D1063E558D}.Debug-Desktop|Any CPU.ActiveCfg = Debug|Any CPU + {814616B6-04D3-47BB-8BFE-92D1063E558D}.Debug-Desktop|Any CPU.Build.0 = Debug|Any CPU + {814616B6-04D3-47BB-8BFE-92D1063E558D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {814616B6-04D3-47BB-8BFE-92D1063E558D}.Release|Any CPU.Build.0 = Release|Any CPU + {814616B6-04D3-47BB-8BFE-92D1063E558D}.Release-Android|Any CPU.ActiveCfg = Release|Any CPU + {814616B6-04D3-47BB-8BFE-92D1063E558D}.Release-Android|Any CPU.Build.0 = Release|Any CPU + {814616B6-04D3-47BB-8BFE-92D1063E558D}.Release-Blazor|Any CPU.ActiveCfg = Release|Any CPU + {814616B6-04D3-47BB-8BFE-92D1063E558D}.Release-Blazor|Any CPU.Build.0 = Release|Any CPU + {814616B6-04D3-47BB-8BFE-92D1063E558D}.Release-Desktop|Any CPU.ActiveCfg = Release|Any CPU + {814616B6-04D3-47BB-8BFE-92D1063E558D}.Release-Desktop|Any CPU.Build.0 = Release|Any CPU + {814616B6-04D3-47BB-8BFE-92D1063E558D}.Release-NuGet|Any CPU.ActiveCfg = Release|Any CPU + {814616B6-04D3-47BB-8BFE-92D1063E558D}.Release-NuGet|Any CPU.Build.0 = Release|Any CPU + {6BAB1317-AF97-4CFD-806C-98D8510A95E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6BAB1317-AF97-4CFD-806C-98D8510A95E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6BAB1317-AF97-4CFD-806C-98D8510A95E3}.Debug-Android|Any CPU.ActiveCfg = Debug|Any CPU + {6BAB1317-AF97-4CFD-806C-98D8510A95E3}.Debug-Android|Any CPU.Build.0 = Debug|Any CPU + {6BAB1317-AF97-4CFD-806C-98D8510A95E3}.Debug-Blazor|Any CPU.ActiveCfg = Debug|Any CPU + {6BAB1317-AF97-4CFD-806C-98D8510A95E3}.Debug-Blazor|Any CPU.Build.0 = Debug|Any CPU + {6BAB1317-AF97-4CFD-806C-98D8510A95E3}.Debug-Desktop|Any CPU.ActiveCfg = Debug|Any CPU + {6BAB1317-AF97-4CFD-806C-98D8510A95E3}.Debug-Desktop|Any CPU.Build.0 = Debug|Any CPU + {6BAB1317-AF97-4CFD-806C-98D8510A95E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6BAB1317-AF97-4CFD-806C-98D8510A95E3}.Release|Any CPU.Build.0 = Release|Any CPU + {6BAB1317-AF97-4CFD-806C-98D8510A95E3}.Release-Android|Any CPU.ActiveCfg = Release|Any CPU + {6BAB1317-AF97-4CFD-806C-98D8510A95E3}.Release-Android|Any CPU.Build.0 = Release|Any CPU + {6BAB1317-AF97-4CFD-806C-98D8510A95E3}.Release-Blazor|Any CPU.ActiveCfg = Release|Any CPU + {6BAB1317-AF97-4CFD-806C-98D8510A95E3}.Release-Blazor|Any CPU.Build.0 = Release|Any CPU + {6BAB1317-AF97-4CFD-806C-98D8510A95E3}.Release-Desktop|Any CPU.ActiveCfg = Release|Any CPU + {6BAB1317-AF97-4CFD-806C-98D8510A95E3}.Release-Desktop|Any CPU.Build.0 = Release|Any CPU + {6BAB1317-AF97-4CFD-806C-98D8510A95E3}.Release-NuGet|Any CPU.ActiveCfg = Release|Any CPU + {6BAB1317-AF97-4CFD-806C-98D8510A95E3}.Release-NuGet|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1875,6 +2129,21 @@ Global {A1E5AC7E-97B2-4BED-AB75-780416E422A5} = {D1853E25-C274-44E7-8AB6-9BE3A4E61928} {D1853E25-C274-44E7-8AB6-9BE3A4E61928} = {E68628DA-312F-4171-A5ED-08072B5CCA3C} {DF33EBD9-9CD9-409C-A10F-AC6FA8FA851D} = {B2C0746D-E5CC-45F1-BD88-3E0D5A2A7191} + {C8163C6A-2273-4FEF-A426-D908451BC776} = {E1BC200B-7234-4037-9421-E65FD4D915B0} + {2D40C8B1-DA7B-45C5-B841-1CED3245CC40} = {C8163C6A-2273-4FEF-A426-D908451BC776} + {070A34B2-E8E2-498E-B472-677E28A057BB} = {EC28C91A-2067-494C-BE18-B2057BBB6516} + {17E70A4F-1E6C-496F-ACC8-00FA29C199BB} = {EC28C91A-2067-494C-BE18-B2057BBB6516} + {0234DB19-DE7E-4C79-8DA0-9E71CA4C9366} = {EC28C91A-2067-494C-BE18-B2057BBB6516} + {1D85235B-44A2-4E0C-B6D5-699C902EFEB0} = {797820E5-77CF-4B31-85F1-08FEA6555951} + {DDFE5FE3-74B4-48F1-B354-64F0407FFB4C} = {9A397829-D9DE-4D77-9348-4D301E841F63} + {B902C801-1BC6-4054-976F-099E0571ABC6} = {9A397829-D9DE-4D77-9348-4D301E841F63} + {B8FC3064-B9E8-46A8-A2DF-DD448DD5CB08} = {176B5BD9-DFAB-4FAF-BE61-067124AEC79B} + {9A397829-D9DE-4D77-9348-4D301E841F63} = {EC28C91A-2067-494C-BE18-B2057BBB6516} + {D1A6CC87-12D7-44CF-800A-A82AB27425F1} = {797820E5-77CF-4B31-85F1-08FEA6555951} + {797820E5-77CF-4B31-85F1-08FEA6555951} = {9A397829-D9DE-4D77-9348-4D301E841F63} + {176B5BD9-DFAB-4FAF-BE61-067124AEC79B} = {9A397829-D9DE-4D77-9348-4D301E841F63} + {814616B6-04D3-47BB-8BFE-92D1063E558D} = {176B5BD9-DFAB-4FAF-BE61-067124AEC79B} + {6BAB1317-AF97-4CFD-806C-98D8510A95E3} = {797820E5-77CF-4B31-85F1-08FEA6555951} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {CC1775C2-579F-4897-8770-592966D00E3D} diff --git a/src/Base/Common/ColorFormat.cs b/src/Base/Common/ColorFormat.cs index a04962943..7697519a5 100644 --- a/src/Base/Common/ColorFormat.cs +++ b/src/Base/Common/ColorFormat.cs @@ -1,4 +1,4 @@ -namespace Fusee.Base.Common +namespace Fusee.Base.Common { /// /// ColorFormat information in enum representation. Entries are hints for Color channel encoding. @@ -59,5 +59,17 @@ public enum ColorFormat /// RGBA int, 32bit. /// iRGBA32, + + /// + /// SLIRP + /// BGRA, 32bit. + /// + //BGRA, + + /// + /// SLIRP + /// YUV 420, 32bit. + /// + //YUV420, } } \ No newline at end of file diff --git a/src/Base/Common/Fusee.Base.Common.csproj b/src/Base/Common/Fusee.Base.Common.csproj index 072241484..436483fc0 100644 --- a/src/Base/Common/Fusee.Base.Common.csproj +++ b/src/Base/Common/Fusee.Base.Common.csproj @@ -6,6 +6,7 @@ true Fusee Base Common + AnyCPU;x64 diff --git a/src/Base/Common/ImagePixelFormat.cs b/src/Base/Common/ImagePixelFormat.cs index ff57f0b07..c474a0cc2 100644 --- a/src/Base/Common/ImagePixelFormat.cs +++ b/src/Base/Common/ImagePixelFormat.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace Fusee.Base.Common { @@ -38,6 +38,9 @@ public int BytesPerPixel ColorFormat == ColorFormat.uiRgb8 ? 3 : ColorFormat == ColorFormat.RGBA + // SLIRP + //|| ColorFormat == ColorFormat.BGRA + //|| ColorFormat == ColorFormat.YUV420 ? 4 : ColorFormat == ColorFormat.fRGB16 ? 6 : diff --git a/src/Base/Common/ScanLine.cs b/src/Base/Common/ScanLine.cs index 3c8c77a99..ae80554d5 100644 --- a/src/Base/Common/ScanLine.cs +++ b/src/Base/Common/ScanLine.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Fusee.Base.Common { @@ -64,6 +64,10 @@ public int BytesPerPixel ColorFormat.Depth24 => 3, ColorFormat.uiRgb8 => 3, ColorFormat.RGBA => 4, + // SLIRP + // ColorFormat.BGRA => 4, + // ColorFormat.YUV420 => 4, + // SLIRP close ColorFormat.fRGB16 => 6, ColorFormat.fRGBA16 => 8, ColorFormat.fRGB32 => 12, diff --git a/src/Base/Core/Fusee.Base.Core.csproj b/src/Base/Core/Fusee.Base.Core.csproj index de028f72d..aa800a965 100644 --- a/src/Base/Core/Fusee.Base.Core.csproj +++ b/src/Base/Core/Fusee.Base.Core.csproj @@ -6,6 +6,7 @@ true Fusee Base Core + AnyCPU;x64 diff --git a/src/Base/Imp/Desktop/Fusee.Base.Imp.Desktop.csproj b/src/Base/Imp/Desktop/Fusee.Base.Imp.Desktop.csproj index 194a9415d..972344d37 100644 --- a/src/Base/Imp/Desktop/Fusee.Base.Imp.Desktop.csproj +++ b/src/Base/Imp/Desktop/Fusee.Base.Imp.Desktop.csproj @@ -7,6 +7,7 @@ true Fusee Base Imp Desktop + AnyCPU;x64 diff --git a/src/Engine/Common/Fusee.Engine.Common.csproj b/src/Engine/Common/Fusee.Engine.Common.csproj index 63569d1ea..58bfe06ad 100644 --- a/src/Engine/Common/Fusee.Engine.Common.csproj +++ b/src/Engine/Common/Fusee.Engine.Common.csproj @@ -6,6 +6,7 @@ true Fusee Engine Common + AnyCPU;x64 diff --git a/src/Engine/Common/IRenderCanvasImp.cs b/src/Engine/Common/IRenderCanvasImp.cs index 1a32ab71e..313563cc4 100644 --- a/src/Engine/Common/IRenderCanvasImp.cs +++ b/src/Engine/Common/IRenderCanvasImp.cs @@ -135,6 +135,7 @@ public interface IRenderCanvasImp /// public void DoRender(); + /// /// Does the resize on this instance. /// diff --git a/src/Engine/Core/Fusee.Engine.Core.csproj b/src/Engine/Core/Fusee.Engine.Core.csproj index 33b1c9a3a..826f6fc93 100644 --- a/src/Engine/Core/Fusee.Engine.Core.csproj +++ b/src/Engine/Core/Fusee.Engine.Core.csproj @@ -6,6 +6,7 @@ true Fusee Engine Core enable + AnyCPU;x64 diff --git a/src/Engine/Core/Input.cs b/src/Engine/Core/Input.cs index 2cdfe70f1..026e0eef7 100644 --- a/src/Engine/Core/Input.cs +++ b/src/Engine/Core/Input.cs @@ -403,8 +403,6 @@ public void AddInputDriverImp(IInputDriverImp inputDriver) /// public static void AddDriverImp(IInputDriverImp inputDriver) => Instance.AddInputDriverImp(inputDriver); - - private void OnNewDeviceImpConnected(object sender, NewDeviceImpConnectedArgs args) { if (sender == null) throw new ArgumentNullException(nameof(sender)); diff --git a/src/Engine/Core/RenderCanvas.cs b/src/Engine/Core/RenderCanvas.cs index d655673b6..db7d1bb71 100644 --- a/src/Engine/Core/RenderCanvas.cs +++ b/src/Engine/Core/RenderCanvas.cs @@ -24,7 +24,8 @@ public class RenderCanvas /// The canvas implementor. /// [InjectMe] - public IRenderCanvasImp CanvasImplementor { set; get; } + public IRenderCanvasImp CanvasImplementor { + set; get; } /// /// Gets and sets the RenderContext implementor. @@ -63,10 +64,6 @@ public class RenderCanvas #endregion - #region Constructors - - #endregion - #region Members /// @@ -243,6 +240,7 @@ public void InitApp() }; } + /// /// Callback method to invoke user code for updating a frame. /// diff --git a/src/Engine/GUI/Fusee.Engine.Gui.csproj b/src/Engine/GUI/Fusee.Engine.Gui.csproj index 5037618e2..d33000d1c 100644 --- a/src/Engine/GUI/Fusee.Engine.Gui.csproj +++ b/src/Engine/GUI/Fusee.Engine.Gui.csproj @@ -6,6 +6,7 @@ true Fusee Engine GUI + AnyCPU;x64 diff --git a/src/Engine/Imp/Graphics/Android/RenderCanvasImp.cs b/src/Engine/Imp/Graphics/Android/RenderCanvasImp.cs index 06b25b941..82cdad440 100644 --- a/src/Engine/Imp/Graphics/Android/RenderCanvasImp.cs +++ b/src/Engine/Imp/Graphics/Android/RenderCanvasImp.cs @@ -303,6 +303,11 @@ public void Run() /// public event EventHandler Render; + /// + /// Occurs when [postrender]. + /// + public event EventHandler PostRender; + /// /// Occurs when [resize]. /// @@ -342,6 +347,11 @@ public void DoRender() Render?.Invoke(this, new RenderEventArgs()); } + public void DoPostRender() + { + PostRender?.Invoke(this, new PostRenderEventArgs()); + } + /// /// Does the resize on this instance. /// @@ -350,6 +360,7 @@ public void DoResize(int width, int height) Resize?.Invoke(this, new ResizeEventArgs(width, height)); } + } internal class RenderCanvasGameView : AndroidGameView diff --git a/src/Engine/Imp/Graphics/Blazor/RenderCanvasImp.cs b/src/Engine/Imp/Graphics/Blazor/RenderCanvasImp.cs index 065104bac..d6f0552a3 100644 --- a/src/Engine/Imp/Graphics/Blazor/RenderCanvasImp.cs +++ b/src/Engine/Imp/Graphics/Blazor/RenderCanvasImp.cs @@ -93,6 +93,11 @@ public RenderCanvasImp(IJSObjectReference canvas, IJSRuntime runtime, WebGL2Rend /// public event EventHandler Render; + /// + /// Occurs when [postrender]. + /// + public event EventHandler PostRender; + /// /// Occurs when resizing. /// @@ -187,6 +192,14 @@ public void DoRender() Render?.Invoke(this, new RenderEventArgs()); } + /// + /// Does the postrender of this instance. + /// + public void DoPostRender() + { + throw new NotImplementedException(); + } + /// /// Does initialize this instance. /// @@ -223,5 +236,7 @@ public void DoResize(int w, int h) Resize?.Invoke(this, new ResizeEventArgs(w, h)); } + + } } \ No newline at end of file diff --git a/src/Engine/Imp/Graphics/Desktop/Fusee.Engine.Imp.Graphics.Desktop.csproj b/src/Engine/Imp/Graphics/Desktop/Fusee.Engine.Imp.Graphics.Desktop.csproj index b2701eb43..d7b38b3c3 100644 --- a/src/Engine/Imp/Graphics/Desktop/Fusee.Engine.Imp.Graphics.Desktop.csproj +++ b/src/Engine/Imp/Graphics/Desktop/Fusee.Engine.Imp.Graphics.Desktop.csproj @@ -9,6 +9,8 @@ Fusee Engine Imp Graphics Desktop true + + AnyCPU;x64 diff --git a/src/Engine/Imp/Graphics/Desktop/RenderCanvasImp.cs b/src/Engine/Imp/Graphics/Desktop/RenderCanvasImp.cs index 7564bcaa9..fa292a285 100644 --- a/src/Engine/Imp/Graphics/Desktop/RenderCanvasImp.cs +++ b/src/Engine/Imp/Graphics/Desktop/RenderCanvasImp.cs @@ -206,6 +206,9 @@ public int TryptMonitorSetupHorizontal internal RenderCanvasGameWindow _gameWindow; + // SLIRP + // has to be exposed so that the SLIRP program can map new input resources + protected GameWindow GW => _gameWindow; #endregion #region Constructors diff --git a/src/Engine/Imp/Graphics/Desktop/RenderContextImp.cs b/src/Engine/Imp/Graphics/Desktop/RenderContextImp.cs index 74792d954..3422edd68 100644 --- a/src/Engine/Imp/Graphics/Desktop/RenderContextImp.cs +++ b/src/Engine/Imp/Graphics/Desktop/RenderContextImp.cs @@ -204,7 +204,12 @@ private SizedInternalFormat GetSizedInteralFormat(ImagePixelFormat format) ColorFormat.Depth16 => (SizedInternalFormat)All.DepthComponent16, ColorFormat.RGB => (SizedInternalFormat)All.Rgb8, ColorFormat.Intensity => (SizedInternalFormat)All.R8, + // SLIRP + // ColorFormat.BGRA => (SizedInternalFormat)All.Bgra, + // ColorFormat.YUV420 => (SizedInternalFormat)All.YUV420, + // SLIRP close _ => throw new ArgumentOutOfRangeException("SizedInternalFormat not supported. Try to use a format with r,g,b and a components."), + }; } diff --git a/src/Jometri/Fusee.Jometri.csproj b/src/Jometri/Fusee.Jometri.csproj index 56e25e1d9..f127dda46 100644 --- a/src/Jometri/Fusee.Jometri.csproj +++ b/src/Jometri/Fusee.Jometri.csproj @@ -6,6 +6,7 @@ true Fusee Jometri + AnyCPU;x64 diff --git a/src/Math/Core/Fusee.Math.Core.csproj b/src/Math/Core/Fusee.Math.Core.csproj index 7dac979e0..9847c6b9a 100644 --- a/src/Math/Core/Fusee.Math.Core.csproj +++ b/src/Math/Core/Fusee.Math.Core.csproj @@ -9,6 +9,7 @@ enable true + AnyCPU;x64 diff --git a/src/PointCloud/Common/Fusee.PointCloud.Common.csproj b/src/PointCloud/Common/Fusee.PointCloud.Common.csproj index ef134cf84..6309a22ac 100644 --- a/src/PointCloud/Common/Fusee.PointCloud.Common.csproj +++ b/src/PointCloud/Common/Fusee.PointCloud.Common.csproj @@ -3,6 +3,7 @@ netstandard2.1;net7.0 $(OutputPath)\$(RootNamespace).xml + AnyCPU;x64 diff --git a/src/PointCloud/Core/Fusee.PointCloud.Core.csproj b/src/PointCloud/Core/Fusee.PointCloud.Core.csproj index 7a280dd13..fcddfa8cd 100644 --- a/src/PointCloud/Core/Fusee.PointCloud.Core.csproj +++ b/src/PointCloud/Core/Fusee.PointCloud.Core.csproj @@ -3,6 +3,7 @@ netstandard2.1;net7.0 $(OutputPath)\$(RootNamespace).xml + AnyCPU;x64 diff --git a/src/PointCloud/Potree/Fusee.PointCloud.Potree.csproj b/src/PointCloud/Potree/Fusee.PointCloud.Potree.csproj index 52c49bd00..c167bb884 100644 --- a/src/PointCloud/Potree/Fusee.PointCloud.Potree.csproj +++ b/src/PointCloud/Potree/Fusee.PointCloud.Potree.csproj @@ -4,6 +4,7 @@ netstandard2.1;net7.0 $(OutputPath)\$(RootNamespace).xml enable + AnyCPU;x64 diff --git a/src/Serialization/Fusee.Serialization.csproj b/src/Serialization/Fusee.Serialization.csproj index 8c44d05f9..f0c4f74a3 100644 --- a/src/Serialization/Fusee.Serialization.csproj +++ b/src/Serialization/Fusee.Serialization.csproj @@ -6,6 +6,7 @@ true Fusee Serialization + AnyCPU;x64 diff --git a/src/Structures/Fusee.Structures.csproj b/src/Structures/Fusee.Structures.csproj index df0631a63..1cb022fdf 100644 --- a/src/Structures/Fusee.Structures.csproj +++ b/src/Structures/Fusee.Structures.csproj @@ -6,6 +6,7 @@ true Fusee Structures + AnyCPU;x64 diff --git a/src/Tests/Render/Desktop/Run.cs b/src/Tests/Render/Desktop/Run.cs index ed59d93fb..42637f4f7 100644 --- a/src/Tests/Render/Desktop/Run.cs +++ b/src/Tests/Render/Desktop/Run.cs @@ -1,4 +1,5 @@ using NUnitLite; +using System; namespace Fusee.Tests.Render.Desktop { @@ -6,6 +7,8 @@ internal static class Run { public static int Main(string[] args) { + Console.WriteLine("Start Render"); + Program.Example = new Fusee.Examples.AdvancedUI.Core.AdvancedUI() { rnd = new System.Random(12345) }; Program.Init("AdvancedUI.png"); diff --git a/src/Tests/SLIRP/SLIRPTest/Fusee.Tests.SLIRP.SLIRPTest.csproj b/src/Tests/SLIRP/SLIRPTest/Fusee.Tests.SLIRP.SLIRPTest.csproj new file mode 100644 index 000000000..f8b1d3fc7 --- /dev/null +++ b/src/Tests/SLIRP/SLIRPTest/Fusee.Tests.SLIRP.SLIRPTest.csproj @@ -0,0 +1,32 @@ + + + + net7.0 + $(DefineConstants);PLATFORM_DESKTOP + + $(BaseOutputPath)\Tests\SLIRP\ + Exe + Fusee.Tests.SLIRP.SLIRPTest.Run + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + diff --git a/src/Tests/SLIRP/SLIRPTest/Program.cs b/src/Tests/SLIRP/SLIRPTest/Program.cs new file mode 100644 index 000000000..14c2d7334 --- /dev/null +++ b/src/Tests/SLIRP/SLIRPTest/Program.cs @@ -0,0 +1,110 @@ +using Fusee.Base.Common; +using Fusee.Base.Core; +using Fusee.Base.Imp.Desktop; +using Fusee.Engine.Core; +using Fusee.Engine.Core.Scene; +using Fusee.Serialization; +using SixLabors.ImageSharp; +using SixLabors.ImageSharp.PixelFormats; +using System; +using System.IO; +using System.Threading; +using System.Threading.Tasks; + +namespace Fusee.Tests.SLIRP.SLIRPTest +{ + public static class Program + { + private const int height = 512; + private const int width = 512; + + public static RenderCanvas Example { get; set; } + + public static string FilePath; + + public static void Init(string arg) + { + if (!string.IsNullOrEmpty(arg)) + { + // Inject Fusee.Engine.Base InjectMe dependencies + IO.IOImp = new IOImp(); + AssetStorage.Instance.Dispose(); + + var baseDirOfExample = new Uri(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)); + FilePath = baseDirOfExample.LocalPath; + + var fap = new FileAssetProvider(Path.Combine(baseDirOfExample.LocalPath, "Assets")); + fap.RegisterTypeHandler( + new AssetHandler + { + ReturnedType = typeof(Font), + DecoderAsync = async (id, storage) => + { + if (!Path.GetExtension(id).Contains("ttf", StringComparison.OrdinalIgnoreCase)) return null; + return await Task.Run(() => new Font { _fontImp = new FontImp((Stream)storage) }); + }, + Decoder = (id, storage) => + { + if (!Path.GetExtension(id).Contains("ttf", StringComparison.OrdinalIgnoreCase)) return null; + return new Font { _fontImp = new FontImp((Stream)storage) }; + }, + + Checker = id => Path.GetExtension(id).Contains("ttf", StringComparison.OrdinalIgnoreCase) + }); + fap.RegisterTypeHandler( + new AssetHandler + { + ReturnedType = typeof(SceneContainer), + DecoderAsync = async (id, storage) => + { + if (!Path.GetExtension(id).Contains("fus", StringComparison.OrdinalIgnoreCase)) return null; + return await FusSceneConverter.ConvertFromAsync(ProtoBuf.Serializer.Deserialize((Stream)storage), id); + }, + Decoder = (id, storage) => + { + if (!Path.GetExtension(id).Contains("fus", StringComparison.OrdinalIgnoreCase)) return null; + return FusSceneConverter.ConvertFrom(ProtoBuf.Serializer.Deserialize((Stream)storage), id); + }, + Checker = id => Path.GetExtension(id).Contains("fus", StringComparison.OrdinalIgnoreCase) + }); + AssetStorage.RegisterProvider(fap); + + var app = Example; + + // Inject Fusee.Engine InjectMe dependencies (hard coded) + var cimp = new Engine.Imp.Graphics.Desktop.RenderCanvasImp(null, false, width, height, width, height) + { + EnableBlending = true + }; + app.CanvasImplementor = cimp; + app.ContextImplementor = new Engine.Imp.Graphics.Desktop.RenderContextImp(cimp, Engine.Common.FuseePlatformId.Mesa); + Input.AddDriverImp(new Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(cimp)); + Input.AddDriverImp(new Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(cimp)); + + // Initialize canvas/app and canvas implementor + app.InitApp(); + + ((Engine.Imp.Graphics.Desktop.RenderCanvasImp)app.CanvasImplementor).DoInit(); + ((Engine.Imp.Graphics.Desktop.RenderCanvasImp)app.CanvasImplementor).DoResize(width, height); + ((Engine.Imp.Graphics.Desktop.RenderCanvasImp)app.CanvasImplementor).DoUpdate(); + + SpinWait.SpinUntil(() => app.IsLoaded); + + // skip the first frame, empty, skip the second as deferred needs three, second pass has an empty frame, too + for (var i = 0; i < 3; i++) + { + ((Engine.Imp.Graphics.Desktop.RenderCanvasImp)app.CanvasImplementor).DoRender(); + } + + // Render a single frame and save it + using var img = cimp.ShootCurrentFrame(width, height) as Image; + img.SaveAsPng(Path.Combine(FilePath, arg)); + + // Done + Console.Error.WriteLine($"SUCCESS: Image {Path.Combine(FilePath, arg)} generated."); + + app.CloseGameWindow(); + } + } + } +} diff --git a/src/Tests/SLIRP/SLIRPTest/Run.cs b/src/Tests/SLIRP/SLIRPTest/Run.cs new file mode 100644 index 000000000..6226b5df2 --- /dev/null +++ b/src/Tests/SLIRP/SLIRPTest/Run.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Fusee.Base.Common; +using Fusee.Base.Core; +using Fusee.Base.Imp.Desktop; +using Fusee.Engine.Core; +using Fusee.Engine.Core.Scene; +using Fusee.Serialization; +using Fusee.SLIRP.Core; + + + +namespace Fusee.Tests.SLIRP.SLIRPTest +{ + internal static class Run + { + public static void Main(string[] args) + { + Console.WriteLine("Fusee Initialization Stuff"); + // Inject Fusee.Engine.Base InjectMe dependencies + IO.IOImp = new IOImp(); + + //Irgendwas mit Assets, keine Ahnung + var fap = new FileAssetProvider("Assets"); + fap.RegisterTypeHandler( + new AssetHandler + { + ReturnedType = typeof(Font), + DecoderAsync = async (string id, object storage) => + { + if (!Path.GetExtension(id).Contains("ttf", StringComparison.OrdinalIgnoreCase)) return null; + return await Task.FromResult(new Font { _fontImp = new FontImp((Stream)storage) }); + }, + Decoder = (string id, object storage) => + { + if (!Path.GetExtension(id).Contains("ttf", StringComparison.OrdinalIgnoreCase)) return null; + return new Font { _fontImp = new FontImp((Stream)storage) }; + }, + Checker = id => Path.GetExtension(id).Contains("ttf", StringComparison.OrdinalIgnoreCase) + }); + fap.RegisterTypeHandler( + new AssetHandler + { + ReturnedType = typeof(SceneContainer), + DecoderAsync = async (string id, object storage) => + { + if (!Path.GetExtension(id).Contains("fus", StringComparison.OrdinalIgnoreCase)) return null; + return await FusSceneConverter.ConvertFromAsync(ProtoBuf.Serializer.Deserialize((Stream)storage), id); + }, + Decoder = (string id, object storage) => + { + if (!Path.GetExtension(id).Contains("fus", StringComparison.OrdinalIgnoreCase)) return null; + return FusSceneConverter.ConvertFrom(ProtoBuf.Serializer.Deserialize((Stream)storage), id); + }, + Checker = id => Path.GetExtension(id).Contains("fus", StringComparison.OrdinalIgnoreCase) + }); + + AssetStorage.RegisterProvider(fap); + + //Erstellen der "Applikation" + Console.WriteLine("Create SLIRPer"); + SLIRPer slirper = new SLIRPer(); + + Console.WriteLine("Create PC SLIRPer"); + SLIRPer pcSlirper = new SLIRPer(); + var pcApp = new Fusee.Examples.PointCloudPotree2.Core.PointCloudPotree2(); + + //Console.WriteLine("Init empty SLIRPer"); + //slirper.Init(); + + Console.WriteLine("Init PC SLIRPer"); + slirper.Init(pcApp); + } + } +} diff --git a/src/Xene/Fusee.Xene.csproj b/src/Xene/Fusee.Xene.csproj index c49397bdf..0e81ad3c8 100644 --- a/src/Xene/Fusee.Xene.csproj +++ b/src/Xene/Fusee.Xene.csproj @@ -6,6 +6,7 @@ true Fusee Xene + AnyCPU;x64 diff --git a/src/Xirkit/Fusee.Xirkit.csproj b/src/Xirkit/Fusee.Xirkit.csproj index 7e4b3f541..ec0daa03f 100644 --- a/src/Xirkit/Fusee.Xirkit.csproj +++ b/src/Xirkit/Fusee.Xirkit.csproj @@ -6,6 +6,7 @@ true Fusee Xirkit + AnyCPU;x64