diff --git a/Examples/Complete/AdvancedUI/Core/Assets/FuseeIconTop32.png b/Examples/Complete/AdvancedUI/Core/Assets/FuseeIconTop32.png
new file mode 100644
index 0000000000..61f50dd9fe
Binary files /dev/null and b/Examples/Complete/AdvancedUI/Core/Assets/FuseeIconTop32.png differ
diff --git a/Examples/Complete/AdvancedUI/Desktop/Fusee.Examples.AdvancedUI.Desktop.csproj b/Examples/Complete/AdvancedUI/Desktop/Fusee.Examples.AdvancedUI.Desktop.csproj
index 3188ef96fa..872c69a17a 100644
--- a/Examples/Complete/AdvancedUI/Desktop/Fusee.Examples.AdvancedUI.Desktop.csproj
+++ b/Examples/Complete/AdvancedUI/Desktop/Fusee.Examples.AdvancedUI.Desktop.csproj
@@ -1,5 +1,5 @@
-
+
net6.0
$(BaseOutputPath)\Examples\AdvancedUI\Desktop\
@@ -11,8 +11,7 @@
-
-
+
-
+
\ No newline at end of file
diff --git a/Examples/Complete/AdvancedUI/Desktop/Main.cs b/Examples/Complete/AdvancedUI/Desktop/Main.cs
index 4035ae7bdc..9df53fb22f 100644
--- a/Examples/Complete/AdvancedUI/Desktop/Main.cs
+++ b/Examples/Complete/AdvancedUI/Desktop/Main.cs
@@ -57,8 +57,8 @@ public static void Main()
Core.AdvancedUI app = new();
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- System.Drawing.Icon appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ var icon = AssetStorage.Get("FuseeIconTop32.png");
+ app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(icon);
app.ContextImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(app.CanvasImplementor));
diff --git a/Examples/Complete/BoneAnimation/Core/Assets/FuseeIconTop32.png b/Examples/Complete/BoneAnimation/Core/Assets/FuseeIconTop32.png
new file mode 100644
index 0000000000..61f50dd9fe
Binary files /dev/null and b/Examples/Complete/BoneAnimation/Core/Assets/FuseeIconTop32.png differ
diff --git a/Examples/Complete/BoneAnimation/Desktop/Fusee.Examples.BoneAnimation.Desktop.csproj b/Examples/Complete/BoneAnimation/Desktop/Fusee.Examples.BoneAnimation.Desktop.csproj
index 8010778ca0..da75ddf90a 100644
--- a/Examples/Complete/BoneAnimation/Desktop/Fusee.Examples.BoneAnimation.Desktop.csproj
+++ b/Examples/Complete/BoneAnimation/Desktop/Fusee.Examples.BoneAnimation.Desktop.csproj
@@ -1,5 +1,5 @@
-
+
net6.0
$(BaseOutputPath)\Examples\BoneAnimation\Desktop\
@@ -11,8 +11,6 @@
-
-
-
+
diff --git a/Examples/Complete/BoneAnimation/Desktop/Main.cs b/Examples/Complete/BoneAnimation/Desktop/Main.cs
index a0821b8b12..e2041eab95 100644
--- a/Examples/Complete/BoneAnimation/Desktop/Main.cs
+++ b/Examples/Complete/BoneAnimation/Desktop/Main.cs
@@ -57,8 +57,8 @@ public static void Main()
var app = new Fusee.Examples.BoneAnimation.Core.Bone();
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- var appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ var icon = AssetStorage.Get("FuseeIconTop32.png");
+ app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(icon);
app.ContextImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(app.CanvasImplementor));
diff --git a/Examples/Complete/Camera/Core/Assets/FuseeIconTop32.png b/Examples/Complete/Camera/Core/Assets/FuseeIconTop32.png
new file mode 100644
index 0000000000..61f50dd9fe
Binary files /dev/null and b/Examples/Complete/Camera/Core/Assets/FuseeIconTop32.png differ
diff --git a/Examples/Complete/Camera/Desktop/Fusee.Examples.Camera.Desktop.csproj b/Examples/Complete/Camera/Desktop/Fusee.Examples.Camera.Desktop.csproj
index d478885c22..12bce10c98 100644
--- a/Examples/Complete/Camera/Desktop/Fusee.Examples.Camera.Desktop.csproj
+++ b/Examples/Complete/Camera/Desktop/Fusee.Examples.Camera.Desktop.csproj
@@ -11,8 +11,6 @@
-
-
-
+
\ No newline at end of file
diff --git a/Examples/Complete/Camera/Desktop/Main.cs b/Examples/Complete/Camera/Desktop/Main.cs
index 6facc88892..b3375b3454 100644
--- a/Examples/Complete/Camera/Desktop/Main.cs
+++ b/Examples/Complete/Camera/Desktop/Main.cs
@@ -57,8 +57,8 @@ public static void Main()
var app = new Core.CameraExample();
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- System.Drawing.Icon appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ var icon = AssetStorage.Get("FuseeIconTop32.png");
+ app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(icon);
app.ContextImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(app.CanvasImplementor));
diff --git a/Examples/Complete/ComputeFractal/Core/Assets/FuseeIconTop32.png b/Examples/Complete/ComputeFractal/Core/Assets/FuseeIconTop32.png
new file mode 100644
index 0000000000..61f50dd9fe
Binary files /dev/null and b/Examples/Complete/ComputeFractal/Core/Assets/FuseeIconTop32.png differ
diff --git a/Examples/Complete/ComputeFractal/Core/ComputeFractal.cs b/Examples/Complete/ComputeFractal/Core/ComputeFractal.cs
index a4b47413ff..48bd125db2 100644
--- a/Examples/Complete/ComputeFractal/Core/ComputeFractal.cs
+++ b/Examples/Complete/ComputeFractal/Core/ComputeFractal.cs
@@ -39,7 +39,7 @@ public override void Init()
{
_gui = FuseeGuiHelper.CreateDefaultGui(this, CanvasRenderMode.Screen, "Fractal Magnification Factor: " + _depthFactor);
_guiRenderer = new SceneRendererForward(_gui);
- _depthFactorText = _gui.Children[0].Children[1].Children[0].GetComponent();
+ _depthFactorText = _gui.Children[0].Children[0].Children[1].Children[0].GetComponent();
// Set the clear color for the backbuffer to white (100% intensity in all color channels R, G, B, A).
RC.ClearColor = new float4(1, 1, 1, 1);
diff --git a/Examples/Complete/ComputeFractal/Desktop/Fusee.Examples.ComputeFractal.Desktop.csproj b/Examples/Complete/ComputeFractal/Desktop/Fusee.Examples.ComputeFractal.Desktop.csproj
index ece788403b..277425e0e7 100644
--- a/Examples/Complete/ComputeFractal/Desktop/Fusee.Examples.ComputeFractal.Desktop.csproj
+++ b/Examples/Complete/ComputeFractal/Desktop/Fusee.Examples.ComputeFractal.Desktop.csproj
@@ -12,8 +12,6 @@
-
-
\ No newline at end of file
diff --git a/Examples/Complete/ComputeFractal/Desktop/Main.cs b/Examples/Complete/ComputeFractal/Desktop/Main.cs
index 7510a1ea1c..58774903ed 100644
--- a/Examples/Complete/ComputeFractal/Desktop/Main.cs
+++ b/Examples/Complete/ComputeFractal/Desktop/Main.cs
@@ -56,8 +56,8 @@ public static void Main()
var app = new Core.ComputeFractal();
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- System.Drawing.Icon appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ var icon = AssetStorage.Get("FuseeIconTop32.png");
+ app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(icon);
app.ContextImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(app.CanvasImplementor));
diff --git a/Examples/Complete/Deferred/Core/Assets/FuseeIconTop32.png b/Examples/Complete/Deferred/Core/Assets/FuseeIconTop32.png
new file mode 100644
index 0000000000..61f50dd9fe
Binary files /dev/null and b/Examples/Complete/Deferred/Core/Assets/FuseeIconTop32.png differ
diff --git a/Examples/Complete/Deferred/Desktop/Fusee.Examples.Deferred.Desktop.csproj b/Examples/Complete/Deferred/Desktop/Fusee.Examples.Deferred.Desktop.csproj
index 88f6122804..55c8e23dd6 100644
--- a/Examples/Complete/Deferred/Desktop/Fusee.Examples.Deferred.Desktop.csproj
+++ b/Examples/Complete/Deferred/Desktop/Fusee.Examples.Deferred.Desktop.csproj
@@ -1,5 +1,5 @@
-
+
net6.0
$(BaseOutputPath)\Examples\Deferred\Desktop\
@@ -11,8 +11,6 @@
-
-
-
+
\ No newline at end of file
diff --git a/Examples/Complete/Deferred/Desktop/Main.cs b/Examples/Complete/Deferred/Desktop/Main.cs
index 4b8546425e..0bfc0816a6 100644
--- a/Examples/Complete/Deferred/Desktop/Main.cs
+++ b/Examples/Complete/Deferred/Desktop/Main.cs
@@ -55,8 +55,8 @@ public static void Main()
var app = new Core.Deferred();
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- System.Drawing.Icon appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- app.CanvasImplementor = new Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ var icon = AssetStorage.Get("FuseeIconTop32.png");
+ app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(icon);
app.ContextImplementor = new Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(app.CanvasImplementor));
diff --git a/Examples/Complete/GeometryEditing/Core/Assets/FuseeIconTop32.png b/Examples/Complete/GeometryEditing/Core/Assets/FuseeIconTop32.png
new file mode 100644
index 0000000000..61f50dd9fe
Binary files /dev/null and b/Examples/Complete/GeometryEditing/Core/Assets/FuseeIconTop32.png differ
diff --git a/Examples/Complete/GeometryEditing/Desktop/Fusee.Examples.GeometryEditing.Desktop.csproj b/Examples/Complete/GeometryEditing/Desktop/Fusee.Examples.GeometryEditing.Desktop.csproj
index b9b91f8825..71ef7381ca 100644
--- a/Examples/Complete/GeometryEditing/Desktop/Fusee.Examples.GeometryEditing.Desktop.csproj
+++ b/Examples/Complete/GeometryEditing/Desktop/Fusee.Examples.GeometryEditing.Desktop.csproj
@@ -11,8 +11,6 @@
-
-
\ No newline at end of file
diff --git a/Examples/Complete/GeometryEditing/Desktop/Main.cs b/Examples/Complete/GeometryEditing/Desktop/Main.cs
index 4942af92d2..e444bc681c 100644
--- a/Examples/Complete/GeometryEditing/Desktop/Main.cs
+++ b/Examples/Complete/GeometryEditing/Desktop/Main.cs
@@ -57,8 +57,8 @@ public static void Main()
var app = new Core.GeometryEditing();
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- System.Drawing.Icon appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ var icon = AssetStorage.Get("FuseeIconTop32.png");
+ app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(icon);
app.ContextImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(app.CanvasImplementor));
diff --git a/Examples/Complete/Integrations/Wpf/View/MainWindow.xaml.cs b/Examples/Complete/Integrations/Wpf/View/MainWindow.xaml.cs
index f1a228f6c8..d53085671f 100644
--- a/Examples/Complete/Integrations/Wpf/View/MainWindow.xaml.cs
+++ b/Examples/Complete/Integrations/Wpf/View/MainWindow.xaml.cs
@@ -99,8 +99,7 @@ private void OpenFusee()
fuseeApp.FusToWpfEvents += FusToWpfEvents;
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- System.Drawing.Icon appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- fuseeApp.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ fuseeApp.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp();
fuseeApp.ContextImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderContextImp(fuseeApp.CanvasImplementor);
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(fuseeApp.CanvasImplementor));
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(fuseeApp.CanvasImplementor));
diff --git a/Examples/Complete/Labyrinth/Core/Assets/FuseeIconTop32.png b/Examples/Complete/Labyrinth/Core/Assets/FuseeIconTop32.png
new file mode 100644
index 0000000000..61f50dd9fe
Binary files /dev/null and b/Examples/Complete/Labyrinth/Core/Assets/FuseeIconTop32.png differ
diff --git a/Examples/Complete/Labyrinth/Desktop/Fusee.Examples.Labyrinth.Desktop.csproj b/Examples/Complete/Labyrinth/Desktop/Fusee.Examples.Labyrinth.Desktop.csproj
index 7261ab75c4..7182c892d2 100644
--- a/Examples/Complete/Labyrinth/Desktop/Fusee.Examples.Labyrinth.Desktop.csproj
+++ b/Examples/Complete/Labyrinth/Desktop/Fusee.Examples.Labyrinth.Desktop.csproj
@@ -11,8 +11,6 @@
-
-
\ No newline at end of file
diff --git a/Examples/Complete/Labyrinth/Desktop/MainDesktop.cs b/Examples/Complete/Labyrinth/Desktop/MainDesktop.cs
index 6dde98e4f6..fe84bc9b56 100644
--- a/Examples/Complete/Labyrinth/Desktop/MainDesktop.cs
+++ b/Examples/Complete/Labyrinth/Desktop/MainDesktop.cs
@@ -56,8 +56,8 @@ public static void Main()
var app = new Core.Labyrinth();
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- System.Drawing.Icon appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ var icon = AssetStorage.Get("FuseeIconTop32.png");
+ app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(icon);
app.ContextImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(app.CanvasImplementor));
diff --git a/Examples/Complete/Materials/Core/Assets/FuseeIconTop32.png b/Examples/Complete/Materials/Core/Assets/FuseeIconTop32.png
new file mode 100644
index 0000000000..61f50dd9fe
Binary files /dev/null and b/Examples/Complete/Materials/Core/Assets/FuseeIconTop32.png differ
diff --git a/Examples/Complete/Materials/Desktop/Fusee.Examples.Materials.Desktop.csproj b/Examples/Complete/Materials/Desktop/Fusee.Examples.Materials.Desktop.csproj
index e07d89468c..6387a01acd 100644
--- a/Examples/Complete/Materials/Desktop/Fusee.Examples.Materials.Desktop.csproj
+++ b/Examples/Complete/Materials/Desktop/Fusee.Examples.Materials.Desktop.csproj
@@ -1,5 +1,5 @@
-
+
net6.0
$(BaseOutputPath)\Examples\Materials\Desktop\
@@ -11,8 +11,6 @@
-
-
-
+
\ No newline at end of file
diff --git a/Examples/Complete/Materials/Desktop/Main.cs b/Examples/Complete/Materials/Desktop/Main.cs
index 21e4b46aac..ed68e5f7a5 100644
--- a/Examples/Complete/Materials/Desktop/Main.cs
+++ b/Examples/Complete/Materials/Desktop/Main.cs
@@ -56,8 +56,8 @@ public static void Main()
var app = new Core.Materials();
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- System.Drawing.Icon appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ var icon = AssetStorage.Get("FuseeIconTop32.png");
+ app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(icon);
app.ContextImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(app.CanvasImplementor));
diff --git a/Examples/Complete/MeshingAround/Core/Assets/FuseeIconTop32.png b/Examples/Complete/MeshingAround/Core/Assets/FuseeIconTop32.png
new file mode 100644
index 0000000000..61f50dd9fe
Binary files /dev/null and b/Examples/Complete/MeshingAround/Core/Assets/FuseeIconTop32.png differ
diff --git a/Examples/Complete/MeshingAround/Desktop/Fusee.Examples.MeshingAround.Desktop.csproj b/Examples/Complete/MeshingAround/Desktop/Fusee.Examples.MeshingAround.Desktop.csproj
index ade13d2d82..283eec1fce 100644
--- a/Examples/Complete/MeshingAround/Desktop/Fusee.Examples.MeshingAround.Desktop.csproj
+++ b/Examples/Complete/MeshingAround/Desktop/Fusee.Examples.MeshingAround.Desktop.csproj
@@ -11,8 +11,6 @@
-
-
\ No newline at end of file
diff --git a/Examples/Complete/MeshingAround/Desktop/Main.cs b/Examples/Complete/MeshingAround/Desktop/Main.cs
index 5e79da1594..a5702cdf5d 100644
--- a/Examples/Complete/MeshingAround/Desktop/Main.cs
+++ b/Examples/Complete/MeshingAround/Desktop/Main.cs
@@ -56,8 +56,8 @@ public static void Main()
var app = new Core.MeshingAround();
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- var appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ var icon = AssetStorage.Get("FuseeIconTop32.png");
+ app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(icon);
app.ContextImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(app.CanvasImplementor));
diff --git a/Examples/Complete/Picking/Core/Assets/FuseeIconTop32.png b/Examples/Complete/Picking/Core/Assets/FuseeIconTop32.png
new file mode 100644
index 0000000000..61f50dd9fe
Binary files /dev/null and b/Examples/Complete/Picking/Core/Assets/FuseeIconTop32.png differ
diff --git a/Examples/Complete/Picking/Desktop/Fusee.Examples.Picking.Desktop.csproj b/Examples/Complete/Picking/Desktop/Fusee.Examples.Picking.Desktop.csproj
index 74416d2f39..2b5e00e902 100644
--- a/Examples/Complete/Picking/Desktop/Fusee.Examples.Picking.Desktop.csproj
+++ b/Examples/Complete/Picking/Desktop/Fusee.Examples.Picking.Desktop.csproj
@@ -11,8 +11,6 @@
-
-
\ No newline at end of file
diff --git a/Examples/Complete/Picking/Desktop/Main.cs b/Examples/Complete/Picking/Desktop/Main.cs
index 10370727b1..e42491209b 100644
--- a/Examples/Complete/Picking/Desktop/Main.cs
+++ b/Examples/Complete/Picking/Desktop/Main.cs
@@ -57,8 +57,8 @@ public static void Main()
var app = new Core.Picking();
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- System.Drawing.Icon appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ var icon = AssetStorage.Get("FuseeIconTop32.png");
+ app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(icon);
app.ContextImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(app.CanvasImplementor));
diff --git a/Examples/Complete/PickingRayCast/Core/Assets/FuseeIconTop32.png b/Examples/Complete/PickingRayCast/Core/Assets/FuseeIconTop32.png
new file mode 100644
index 0000000000..61f50dd9fe
Binary files /dev/null and b/Examples/Complete/PickingRayCast/Core/Assets/FuseeIconTop32.png differ
diff --git a/Examples/Complete/PickingRayCast/Core/Fusee.Examples.PickingRayCast.Core.csproj b/Examples/Complete/PickingRayCast/Core/Fusee.Examples.PickingRayCast.Core.csproj
index c254f259b4..868c851eac 100644
--- a/Examples/Complete/PickingRayCast/Core/Fusee.Examples.PickingRayCast.Core.csproj
+++ b/Examples/Complete/PickingRayCast/Core/Fusee.Examples.PickingRayCast.Core.csproj
@@ -8,6 +8,10 @@
+
+
+
+
diff --git a/Examples/Complete/PickingRayCast/Desktop/Fusee.Examples.PickingRayCast.Desktop.csproj b/Examples/Complete/PickingRayCast/Desktop/Fusee.Examples.PickingRayCast.Desktop.csproj
index fac537bc3f..3529f9ba61 100644
--- a/Examples/Complete/PickingRayCast/Desktop/Fusee.Examples.PickingRayCast.Desktop.csproj
+++ b/Examples/Complete/PickingRayCast/Desktop/Fusee.Examples.PickingRayCast.Desktop.csproj
@@ -1,18 +1,16 @@
-
-
- netcoreapp6.0
- $(BaseOutputPath)\Examples\PickingRayCast\Desktop\
-
- Exe
-
-
-
-
-
-
-
-
-
+
+ netcoreapp6.0
+ $(BaseOutputPath)\Examples\PickingRayCast\Desktop\
+
+ Exe
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Examples/Complete/PickingRayCast/Desktop/Main.cs b/Examples/Complete/PickingRayCast/Desktop/Main.cs
index 86a6930183..0232039abd 100644
--- a/Examples/Complete/PickingRayCast/Desktop/Main.cs
+++ b/Examples/Complete/PickingRayCast/Desktop/Main.cs
@@ -56,8 +56,8 @@ public static void Main()
var app = new Core.PickingRayCast();
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- System.Drawing.Icon appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ var icon = AssetStorage.Get("FuseeIconTop32.png");
+ app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(icon);
app.ContextImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(app.CanvasImplementor));
diff --git a/Examples/Complete/PointCloudLive/Desktop/Fusee.Examples.PointCloudLive.Desktop.csproj b/Examples/Complete/PointCloudLive/Desktop/Fusee.Examples.PointCloudLive.Desktop.csproj
index 25ba1bde5f..386e3e0ac3 100644
--- a/Examples/Complete/PointCloudLive/Desktop/Fusee.Examples.PointCloudLive.Desktop.csproj
+++ b/Examples/Complete/PointCloudLive/Desktop/Fusee.Examples.PointCloudLive.Desktop.csproj
@@ -11,8 +11,6 @@
-
-
\ No newline at end of file
diff --git a/Examples/Complete/PointCloudLive/Desktop/Main.cs b/Examples/Complete/PointCloudLive/Desktop/Main.cs
index 4404629f8f..b2ec1337d7 100644
--- a/Examples/Complete/PointCloudLive/Desktop/Main.cs
+++ b/Examples/Complete/PointCloudLive/Desktop/Main.cs
@@ -55,8 +55,7 @@ public static void Main()
var app = new Core.PointCloudLive();
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- System.Drawing.Icon appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp();
app.ContextImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(app.CanvasImplementor));
diff --git a/Examples/Complete/PointCloudOutOfCore/Desktop/Fusee.Examples.PointCloudOutOfCore.Desktop.csproj b/Examples/Complete/PointCloudOutOfCore/Desktop/Fusee.Examples.PointCloudOutOfCore.Desktop.csproj
index 1279d33a07..f7bf1f45ef 100644
--- a/Examples/Complete/PointCloudOutOfCore/Desktop/Fusee.Examples.PointCloudOutOfCore.Desktop.csproj
+++ b/Examples/Complete/PointCloudOutOfCore/Desktop/Fusee.Examples.PointCloudOutOfCore.Desktop.csproj
@@ -12,8 +12,6 @@
-
-
diff --git a/Examples/Complete/PointCloudOutOfCore/Desktop/Main.cs b/Examples/Complete/PointCloudOutOfCore/Desktop/Main.cs
index 7154635894..425006e949 100644
--- a/Examples/Complete/PointCloudOutOfCore/Desktop/Main.cs
+++ b/Examples/Complete/PointCloudOutOfCore/Desktop/Main.cs
@@ -68,8 +68,7 @@ public static void Main()
AppSetup.DoSetup(out IPcRendering app, ptType, PtRenderingParams.Instance.MaxNoOfVisiblePoints, PtRenderingParams.Instance.PathToOocFile);
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- System.Drawing.Icon appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- app.CanvasImplementor = new Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ app.CanvasImplementor = new Engine.Imp.Graphics.Desktop.RenderCanvasImp();
app.ContextImplementor = new Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(app.CanvasImplementor));
diff --git a/Examples/Complete/PointCloudOutOfCore/Wpf/Fusee.Examples.PointCloudOutOfCore.Wpf.csproj b/Examples/Complete/PointCloudOutOfCore/Wpf/Fusee.Examples.PointCloudOutOfCore.Wpf.csproj
index eacd2affb5..6b699ed72e 100644
--- a/Examples/Complete/PointCloudOutOfCore/Wpf/Fusee.Examples.PointCloudOutOfCore.Wpf.csproj
+++ b/Examples/Complete/PointCloudOutOfCore/Wpf/Fusee.Examples.PointCloudOutOfCore.Wpf.csproj
@@ -33,7 +33,6 @@
-
\ No newline at end of file
diff --git a/Examples/Complete/PointCloudOutOfCore/Wpf/MainWindow.xaml.cs b/Examples/Complete/PointCloudOutOfCore/Wpf/MainWindow.xaml.cs
index 0722c09e8b..db227f29b9 100644
--- a/Examples/Complete/PointCloudOutOfCore/Wpf/MainWindow.xaml.cs
+++ b/Examples/Complete/PointCloudOutOfCore/Wpf/MainWindow.xaml.cs
@@ -121,7 +121,7 @@ private void EDLNeighbourPxSlider_ValueChanged(object sender, RoutedPropertyChan
PtRenderingParams.Instance.EdlNoOfNeighbourPx = (int)e.NewValue;
}
- #endregion
+ #endregion
#region point size
private void PtSize_DragStarted(object sender, System.Windows.Controls.Primitives.DragStartedEventArgs e)
@@ -226,7 +226,7 @@ private void LoadFile_Button_Click(object sender, RoutedEventArgs e)
if (App != null)
{
App.ClosingRequested = true;
- SpinWait.SpinUntil(() => App.ReadyToLoadNewFile); //End of frame
+ SpinWait.SpinUntil(() => App.ReadyToLoadNewFile); //End of frame
App.CloseGameWindow();
SpinWait.SpinUntil(() => !App.IsAlive);
AssetStorage.UnRegisterAllAssetProviders();
@@ -388,8 +388,7 @@ private void CreateApp(string pathToFile, int th)
App.UseWPF = true;
//Inject Fusee.Engine InjectMe dependencies(hard coded)
- System.Drawing.Icon appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- App.CanvasImplementor = new Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon, true);
+ App.CanvasImplementor = new Engine.Imp.Graphics.Desktop.RenderCanvasImp();
App.ContextImplementor = new Engine.Imp.Graphics.Desktop.RenderContextImp(App.CanvasImplementor);
Input.AddDriverImp(new Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(App.CanvasImplementor));
Input.AddDriverImp(new Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(App.CanvasImplementor));
diff --git a/Examples/Complete/RenderLayer/Core/Assets/FuseeIconTop32.png b/Examples/Complete/RenderLayer/Core/Assets/FuseeIconTop32.png
new file mode 100644
index 0000000000..61f50dd9fe
Binary files /dev/null and b/Examples/Complete/RenderLayer/Core/Assets/FuseeIconTop32.png differ
diff --git a/Examples/Complete/RenderLayer/Desktop/Fusee.Examples.RenderLayer.Desktop.csproj b/Examples/Complete/RenderLayer/Desktop/Fusee.Examples.RenderLayer.Desktop.csproj
index 862419c28b..139e112206 100644
--- a/Examples/Complete/RenderLayer/Desktop/Fusee.Examples.RenderLayer.Desktop.csproj
+++ b/Examples/Complete/RenderLayer/Desktop/Fusee.Examples.RenderLayer.Desktop.csproj
@@ -11,8 +11,6 @@
-
-
\ No newline at end of file
diff --git a/Examples/Complete/RenderLayer/Desktop/Main.cs b/Examples/Complete/RenderLayer/Desktop/Main.cs
index a169aed2b3..6c36ebf0da 100644
--- a/Examples/Complete/RenderLayer/Desktop/Main.cs
+++ b/Examples/Complete/RenderLayer/Desktop/Main.cs
@@ -57,8 +57,8 @@ public static void Main()
var app = new Core.RenderLayerExample();
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- System.Drawing.Icon appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ var icon = AssetStorage.Get("FuseeIconTop32.png");
+ app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(icon);
app.ContextImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(app.CanvasImplementor));
diff --git a/Examples/Complete/Simple/Core/Assets/FuseeIconTop32.png b/Examples/Complete/Simple/Core/Assets/FuseeIconTop32.png
new file mode 100644
index 0000000000..61f50dd9fe
Binary files /dev/null and b/Examples/Complete/Simple/Core/Assets/FuseeIconTop32.png differ
diff --git a/Examples/Complete/Simple/Desktop/Fusee.Examples.Simple.Desktop.csproj b/Examples/Complete/Simple/Desktop/Fusee.Examples.Simple.Desktop.csproj
index 02ccc8c2d4..32b942f8d6 100644
--- a/Examples/Complete/Simple/Desktop/Fusee.Examples.Simple.Desktop.csproj
+++ b/Examples/Complete/Simple/Desktop/Fusee.Examples.Simple.Desktop.csproj
@@ -11,8 +11,6 @@
-
-
\ No newline at end of file
diff --git a/Examples/Complete/Simple/Desktop/Main.cs b/Examples/Complete/Simple/Desktop/Main.cs
index 734a744908..6bddd755f2 100644
--- a/Examples/Complete/Simple/Desktop/Main.cs
+++ b/Examples/Complete/Simple/Desktop/Main.cs
@@ -56,8 +56,8 @@ public static void Main()
var app = new Core.Simple();
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- System.Drawing.Icon appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ var icon = AssetStorage.Get("FuseeIconTop32.png");
+ app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(icon);
app.ContextImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(app.CanvasImplementor));
diff --git a/Examples/Complete/Starkiller/Core/Assets/FuseeIconTop32.png b/Examples/Complete/Starkiller/Core/Assets/FuseeIconTop32.png
new file mode 100644
index 0000000000..61f50dd9fe
Binary files /dev/null and b/Examples/Complete/Starkiller/Core/Assets/FuseeIconTop32.png differ
diff --git a/Examples/Complete/Starkiller/Desktop/Fusee.Examples.Starkiller.Desktop.csproj b/Examples/Complete/Starkiller/Desktop/Fusee.Examples.Starkiller.Desktop.csproj
index 6d45196de5..92f8177358 100644
--- a/Examples/Complete/Starkiller/Desktop/Fusee.Examples.Starkiller.Desktop.csproj
+++ b/Examples/Complete/Starkiller/Desktop/Fusee.Examples.Starkiller.Desktop.csproj
@@ -11,8 +11,6 @@
-
-
\ No newline at end of file
diff --git a/Examples/Complete/Starkiller/Desktop/MainDesktop.cs b/Examples/Complete/Starkiller/Desktop/MainDesktop.cs
index d1aa61afae..f221f74bd1 100644
--- a/Examples/Complete/Starkiller/Desktop/MainDesktop.cs
+++ b/Examples/Complete/Starkiller/Desktop/MainDesktop.cs
@@ -56,8 +56,8 @@ public static void Main()
var app = new Core.Starkiller();
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- System.Drawing.Icon appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ var icon = AssetStorage.Get("FuseeIconTop32.png");
+ app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(icon);
app.ContextImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(app.CanvasImplementor));
diff --git a/Examples/Complete/ThreeDFont/Core/Assets/FuseeIconTop32.png b/Examples/Complete/ThreeDFont/Core/Assets/FuseeIconTop32.png
new file mode 100644
index 0000000000..61f50dd9fe
Binary files /dev/null and b/Examples/Complete/ThreeDFont/Core/Assets/FuseeIconTop32.png differ
diff --git a/Examples/Complete/ThreeDFont/Desktop/Fusee.Examples.ThreeDFont.Desktop.csproj b/Examples/Complete/ThreeDFont/Desktop/Fusee.Examples.ThreeDFont.Desktop.csproj
index 24a912f5da..3095c77699 100644
--- a/Examples/Complete/ThreeDFont/Desktop/Fusee.Examples.ThreeDFont.Desktop.csproj
+++ b/Examples/Complete/ThreeDFont/Desktop/Fusee.Examples.ThreeDFont.Desktop.csproj
@@ -11,8 +11,6 @@
-
-
\ No newline at end of file
diff --git a/Examples/Complete/ThreeDFont/Desktop/Main.cs b/Examples/Complete/ThreeDFont/Desktop/Main.cs
index 422fd2845b..08f6ee4d2e 100644
--- a/Examples/Complete/ThreeDFont/Desktop/Main.cs
+++ b/Examples/Complete/ThreeDFont/Desktop/Main.cs
@@ -56,8 +56,8 @@ public static void Main()
var app = new Core.ThreeDFont();
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- var appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ var icon = AssetStorage.Get("FuseeIconTop32.png");
+ app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(icon);
app.ContextImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(app.CanvasImplementor));
diff --git a/Examples/Complete/UI/Core/Assets/FuseeIconTop32.png b/Examples/Complete/UI/Core/Assets/FuseeIconTop32.png
new file mode 100644
index 0000000000..61f50dd9fe
Binary files /dev/null and b/Examples/Complete/UI/Core/Assets/FuseeIconTop32.png differ
diff --git a/Examples/Complete/UI/Desktop/Fusee.Examples.UI.Desktop.csproj b/Examples/Complete/UI/Desktop/Fusee.Examples.UI.Desktop.csproj
index ac3f489c08..2a4a8c709f 100644
--- a/Examples/Complete/UI/Desktop/Fusee.Examples.UI.Desktop.csproj
+++ b/Examples/Complete/UI/Desktop/Fusee.Examples.UI.Desktop.csproj
@@ -11,8 +11,6 @@
-
-
\ No newline at end of file
diff --git a/Examples/Complete/UI/Desktop/Main.cs b/Examples/Complete/UI/Desktop/Main.cs
index cde68ec148..5f5c889129 100644
--- a/Examples/Complete/UI/Desktop/Main.cs
+++ b/Examples/Complete/UI/Desktop/Main.cs
@@ -57,8 +57,8 @@ public static void Main()
var app = new Core.UI();
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- System.Drawing.Icon appIcon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
- app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(appIcon);
+ var icon = AssetStorage.Get("FuseeIconTop32.png");
+ app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(icon);
app.ContextImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.WindowsTouchInputDriverImp(app.CanvasImplementor));
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 a05369485c..3925da9f2c 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
@@ -1,5 +1,5 @@
-
+
net6.0
$(DefineConstants);PLATFORM_DESKTOP
@@ -7,7 +7,7 @@
true
Fusee Engine Imp Graphics Desktop
-
+
true
@@ -29,9 +29,8 @@
-
-
+
\ No newline at end of file
diff --git a/src/Engine/Imp/Graphics/Desktop/RenderCanvasImp.cs b/src/Engine/Imp/Graphics/Desktop/RenderCanvasImp.cs
index 8388861448..be9310fb6b 100644
--- a/src/Engine/Imp/Graphics/Desktop/RenderCanvasImp.cs
+++ b/src/Engine/Imp/Graphics/Desktop/RenderCanvasImp.cs
@@ -1,12 +1,18 @@
+using Fusee.Base.Core;
using Fusee.Engine.Common;
using OpenTK.Graphics.OpenGL;
+using OpenTK.Windowing.Common.Input;
using OpenTK.Windowing.Desktop;
using OpenTK.Windowing.GraphicsLibraryFramework;
+using SixLabors.ImageSharp;
+using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing;
using System;
using System.Diagnostics;
using System.Drawing;
+using System.Runtime.InteropServices;
+using Image = OpenTK.Windowing.Common.Input.Image;
using PixelFormat = OpenTK.Graphics.OpenGL.PixelFormat;
-using SDPixelFormat = System.Drawing.Imaging.PixelFormat;
namespace Fusee.Engine.Imp.Graphics.Desktop
{
@@ -193,16 +199,17 @@ public int TryptMonitorSetupHorizontal
///
/// Initializes a new instance of the class.
///
- public RenderCanvasImp() : this(null)
+ public RenderCanvasImp() : this(null, false)
{
+
}
///
/// Initializes a new instance of the class.
///
- /// The icon for the render window.
/// If true OpenTk will call run() in a new Thread. The default value is false.
- public RenderCanvasImp(Icon appIcon, bool isMultithreaded = false)
+ /// The window icon to use
+ public RenderCanvasImp(ImageData icon = null, bool isMultithreaded = false)
{
//TODO: Select correct monitor
MonitorInfo mon = Monitors.GetMonitors()[0];
@@ -233,6 +240,24 @@ public RenderCanvasImp(Icon appIcon, bool isMultithreaded = false)
_gameWindow.CenterWindow();
if (_gameWindow.IsMultiThreaded)
_gameWindow.Context.MakeNoneCurrent();
+
+ // convert icon to OpenTKImage
+ if (icon != null)
+ {
+ // convert Bgra to Rgba for OpenTK.WindowIcon
+ var pxData = SixLabors.ImageSharp.Image.LoadPixelData(icon.PixelData, icon.Width, icon.Height);
+ var bgra = pxData.CloneAs();
+ bgra.Mutate(x => x.AutoOrient());
+ bgra.Mutate(x => x.RotateFlip(RotateMode.None, FlipMode.Vertical));
+
+ if (!bgra.TryGetSinglePixelSpan(out var res))
+ {
+ Diagnostics.Warn("Couldn't convert icon image to Rgba32!");
+ return;
+ }
+ var resBytes = MemoryMarshal.AsBytes(res.ToArray());
+ _gameWindow.Icon = new WindowIcon(new Image[] { new Image(icon.Width, icon.Height, resBytes.ToArray()) });
+ }
}
///
@@ -413,18 +438,20 @@ public void Run()
/// The width of the window, and therefore image to render.
/// The height of the window, and therefore image to render.
///
- public Bitmap ShootCurrentFrame(int width, int height)
+ public SixLabors.ImageSharp.Image ShootCurrentFrame(int width, int height)
{
DoInit();
DoRender();
DoResize(width, height);
- var bmp = new Bitmap(this.Width, this.Height, SDPixelFormat.Format32bppArgb);
- var mem = bmp.LockBits(new System.Drawing.Rectangle(0, 0, Width, Height), System.Drawing.Imaging.ImageLockMode.WriteOnly, SDPixelFormat.Format32bppArgb);
- GL.PixelStore(PixelStoreParameter.PackRowLength, mem.Stride / 4);
- GL.ReadPixels(0, 0, Width, Height, PixelFormat.Bgra, PixelType.UnsignedByte, mem.Scan0);
- bmp.UnlockBits(mem);
- bmp.RotateFlip(RotateFlipType.RotateNoneFlipY);
+ var bmp = new Image(Width, Height);
+ bmp.TryGetSinglePixelSpan(out var mem);
+ GL.PixelStore(PixelStoreParameter.PackRowLength, 1);
+ GL.ReadPixels(0, 0, Width, Height, PixelFormat.Bgra, PixelType.UnsignedByte, ref mem[0]);
+
+ bmp.Mutate(x => x.AutoOrient());
+ bmp.Mutate(x => x.RotateFlip(RotateMode.None, FlipMode.Vertical));
+
return bmp;
}
@@ -614,7 +641,7 @@ protected override void OnLoad()
throw new InvalidOperationException("You need at least OpenGL 2.0 to run this example. GLSL not supported.");
}
- GL.ClearColor(Color.MidnightBlue);
+ GL.ClearColor(25, 25, 112, byte.MaxValue);
GL.Enable(EnableCap.DepthTest);
GL.Enable(EnableCap.CullFace);
diff --git a/src/Engine/Player/Core/Assets/FuseeIconTop32.png b/src/Engine/Player/Core/Assets/FuseeIconTop32.png
new file mode 100644
index 0000000000..61f50dd9fe
Binary files /dev/null and b/src/Engine/Player/Core/Assets/FuseeIconTop32.png differ
diff --git a/src/Engine/Player/Desktop/Fusee.Engine.Player.Desktop.csproj b/src/Engine/Player/Desktop/Fusee.Engine.Player.Desktop.csproj
index a368a735d0..a3f3f7aa70 100644
--- a/src/Engine/Player/Desktop/Fusee.Engine.Player.Desktop.csproj
+++ b/src/Engine/Player/Desktop/Fusee.Engine.Player.Desktop.csproj
@@ -17,8 +17,6 @@
analyzers
-
-
\ No newline at end of file
diff --git a/src/Engine/Player/Desktop/Main.cs b/src/Engine/Player/Desktop/Main.cs
index 7da101711b..27e31ddcc2 100644
--- a/src/Engine/Player/Desktop/Main.cs
+++ b/src/Engine/Player/Desktop/Main.cs
@@ -177,7 +177,8 @@ public static void Main(string[] args)
player.ModelFile = modelFile;
// Inject Fusee.Engine InjectMe dependencies (hard coded)
- app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp();
+ var icon = AssetStorage.Get("FuseeIconTop32.png");
+ app.CanvasImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasImp(icon);
app.ContextImplementor = new Fusee.Engine.Imp.Graphics.Desktop.RenderContextImp(app.CanvasImplementor);
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.RenderCanvasInputDriverImp(app.CanvasImplementor));
Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Desktop.WindowsSpaceMouseDriverImp(app.CanvasImplementor));
diff --git a/src/Tools/CmdLine/Program.cs b/src/Tools/CmdLine/Program.cs
index 9a0027bf87..95c0c29907 100644
--- a/src/Tools/CmdLine/Program.cs
+++ b/src/Tools/CmdLine/Program.cs
@@ -32,11 +32,6 @@ static void Main(string[] args)
})
.WithNotParsed(errs =>
{
- /*foreach (var error in errs)
- {
- Console.Error.WriteLine(error);
- }
- */
Environment.Exit((int)ErrorCode.CommandLineSyntax);
});
}
diff --git a/src/Tools/CmdLine/Verbs/Player.cs b/src/Tools/CmdLine/Verbs/Player.cs
index d0044ddb03..7c5603b293 100644
--- a/src/Tools/CmdLine/Verbs/Player.cs
+++ b/src/Tools/CmdLine/Verbs/Player.cs
@@ -17,7 +17,7 @@
namespace Fusee.Tools.CmdLine.Verbs
{
- [Verb("player", HelpText = "Output the protobuf schema for the .fus file format.")]
+ [Verb("player", HelpText = "Plays given Fusee-App.")]
internal class Player
{
[Value(0, HelpText = "Path or url to .fus/.fuz file or Fusee-App .dll.", MetaName = "Input", Required = false)]