diff --git a/Nerfed.Runtime/Gui/Shaders/generate-spirv.bat b/Nerfed.Runtime/Content/Shaders/generate-spirv.bat
similarity index 100%
rename from Nerfed.Runtime/Gui/Shaders/generate-spirv.bat
rename to Nerfed.Runtime/Content/Shaders/generate-spirv.bat
diff --git a/Nerfed.Runtime/Gui/Shaders/imgui-frag.glsl b/Nerfed.Runtime/Content/Shaders/imgui-frag.glsl
similarity index 100%
rename from Nerfed.Runtime/Gui/Shaders/imgui-frag.glsl
rename to Nerfed.Runtime/Content/Shaders/imgui-frag.glsl
diff --git a/Nerfed.Runtime/Assets/Shaders/imgui-frag.spv b/Nerfed.Runtime/Content/Shaders/imgui-frag.spv
similarity index 100%
rename from Nerfed.Runtime/Assets/Shaders/imgui-frag.spv
rename to Nerfed.Runtime/Content/Shaders/imgui-frag.spv
diff --git a/Nerfed.Runtime/Gui/Shaders/imgui-vertex.glsl b/Nerfed.Runtime/Content/Shaders/imgui-vertex.glsl
similarity index 100%
rename from Nerfed.Runtime/Gui/Shaders/imgui-vertex.glsl
rename to Nerfed.Runtime/Content/Shaders/imgui-vertex.glsl
diff --git a/Nerfed.Runtime/Assets/Shaders/imgui-vertex.spv b/Nerfed.Runtime/Content/Shaders/imgui-vertex.spv
similarity index 100%
rename from Nerfed.Runtime/Assets/Shaders/imgui-vertex.spv
rename to Nerfed.Runtime/Content/Shaders/imgui-vertex.spv
diff --git a/Nerfed.Runtime/Gui/GuiController.cs b/Nerfed.Runtime/Gui/GuiController.cs
index ae610c9..f560b45 100644
--- a/Nerfed.Runtime/Gui/GuiController.cs
+++ b/Nerfed.Runtime/Gui/GuiController.cs
@@ -13,7 +13,7 @@ internal class GuiController : IDisposable
{
public event Action OnGui;
- private readonly string shaderContentPath = Path.Combine(System.AppContext.BaseDirectory, "Assets", "Shaders");
+ private readonly string shaderContentPath = Path.Combine(System.AppContext.BaseDirectory, "Content", "Shaders");
private readonly GraphicsDevice graphicsDevice;
private readonly Window mainWindow;
@@ -175,7 +175,7 @@ private void UpdatePerFrameImGuiData(float deltaSeconds)
io.DeltaTime = deltaSeconds; // DeltaTime is in seconds.
}
- private static void UpdateInput()
+ private void UpdateInput()
{
ImGuiIOPtr io = ImGui.GetIO();
@@ -240,7 +240,7 @@ private static void UpdateInput()
}
}
- private static void UpdateCursor()
+ private void UpdateCursor()
{
ImGuiIOPtr io = ImGui.GetIO();
@@ -500,6 +500,7 @@ private void RenderCommandLists(CommandBuffer commandBuffer, Texture renderTextu
commandBuffer.EndRenderPass(renderPass);
}
+ #region Resources
private unsafe void BuildFontAtlas()
{
ResourceUploader resourceUploader = new ResourceUploader(graphicsDevice);
@@ -528,6 +529,7 @@ out int bytesPerPixel
textureStorage.Add(fontTexture); // <-- The fontTexture seems to get lost after some time (CG?).
this.fontTexture = fontTexture; // <-- So we also keep a reference to make sure it doesn't happen.
}
+ #endregion
#region Window
private void CreateWindow(ImGuiViewportPtr vp)
diff --git a/Nerfed.Runtime/Gui/Shaders/imgui-frag.spv b/Nerfed.Runtime/Gui/Shaders/imgui-frag.spv
deleted file mode 100644
index 550f9a0..0000000
Binary files a/Nerfed.Runtime/Gui/Shaders/imgui-frag.spv and /dev/null differ
diff --git a/Nerfed.Runtime/Gui/Shaders/imgui-vertex.spv b/Nerfed.Runtime/Gui/Shaders/imgui-vertex.spv
deleted file mode 100644
index a63373f..0000000
Binary files a/Nerfed.Runtime/Gui/Shaders/imgui-vertex.spv and /dev/null differ
diff --git a/Nerfed.Runtime/Nerfed.Runtime.csproj b/Nerfed.Runtime/Nerfed.Runtime.csproj
index d209046..a1defe8 100644
--- a/Nerfed.Runtime/Nerfed.Runtime.csproj
+++ b/Nerfed.Runtime/Nerfed.Runtime.csproj
@@ -9,15 +9,12 @@
-
+
+
-
-
-
-
-
+
Always
diff --git a/Nerfed.sln b/Nerfed.sln
index 30ec14e..be1920e 100644
--- a/Nerfed.sln
+++ b/Nerfed.sln
@@ -5,8 +5,6 @@ VisualStudioVersion = 17.10.35013.160
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Nerfed.Runtime", "Nerfed.Runtime\Nerfed.Runtime.csproj", "{98E09BAF-587F-4238-89BD-7693C036C233}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImGui.NET", "Nerfed.Runtime\Libraries\ImGui.NET\src\ImGui.NET\ImGui.NET.csproj", "{4EC3C399-4E09-4A36-B11E-391F0792C1C8}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -17,10 +15,6 @@ Global
{98E09BAF-587F-4238-89BD-7693C036C233}.Debug|Any CPU.Build.0 = Debug|Any CPU
{98E09BAF-587F-4238-89BD-7693C036C233}.Release|Any CPU.ActiveCfg = Release|Any CPU
{98E09BAF-587F-4238-89BD-7693C036C233}.Release|Any CPU.Build.0 = Release|Any CPU
- {4EC3C399-4E09-4A36-B11E-391F0792C1C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4EC3C399-4E09-4A36-B11E-391F0792C1C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4EC3C399-4E09-4A36-B11E-391F0792C1C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4EC3C399-4E09-4A36-B11E-391F0792C1C8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE