Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .run/Example _ Bliss.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Example | Bliss" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/src/Examples/Library/CopperDevs.DearImGui.Example.Bliss/bin/Debug/net9.0/CopperDevs.DearImGui.Example.Bliss" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/src/Examples/Library/CopperDevs.DearImGui.Example.Bliss/bin/Debug/net9.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/src/Examples/Library/CopperDevs.DearImGui.Example.Bliss/CopperDevs.DearImGui.Example.Bliss.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net9.0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Example - OpenGl (Silk.Net)" type="DotNetProject" factoryName=".NET Project">
<configuration default="false" name="Example | OpenGl - Silk.Net" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/src/Examples/OpenGl/CopperDevs.DearImGui.Example.OpenGl.SilkNet/bin/Debug/net8.0/CopperDevs.DearImGui.Example.OpenGl.SilkNet" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/src/Examples/OpenGl/CopperDevs.DearImGui.Example.OpenGl.SilkNet/bin/Debug/net8.0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Example - Raylib-CSharp-Vinculum" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/src/Examples/Raylib/CopperDevs.DearImGui.Example.Raylib.Raylib-CSharp-Vinculum/bin/Debug/net8.0/CopperDevs.DearImGui.Example.Raylib.Raylib-CSharp-Vinculum.exe" />
<configuration default="false" name="Example | Raylib - Raylib-CSharp-Vinculum" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/src/Examples/Raylib/CopperDevs.DearImGui.Example.Raylib.Raylib-CSharp-Vinculum/bin/Debug/net8.0/CopperDevs.DearImGui.Example.Raylib.Raylib-CSharp-Vinculum" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/src/Examples/Raylib/CopperDevs.DearImGui.Example.Raylib.Raylib-CSharp-Vinculum/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Example - Raylib-CSharp" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/src/Examples/Raylib/CopperDevs.DearImGui.Example.Raylib.Raylib-CSharp/bin/Debug/net8.0/CopperDevs.DearImGui.Example.Raylib.Raylib-CSharp.exe" />
<configuration default="false" name="Example | Raylib - Raylib-CSharp" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/src/Examples/Raylib/CopperDevs.DearImGui.Example.Raylib.Raylib-CSharp/bin/Debug/net8.0/CopperDevs.DearImGui.Example.Raylib.Raylib-CSharp" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/src/Examples/Raylib/CopperDevs.DearImGui.Example.Raylib.Raylib-CSharp/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Example - Raylib-cs" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/src/Examples/Raylib/CopperDevs.DearImGui.Example.Raylib.Raylib-cs/bin/Debug/net8.0/CopperDevs.DearImGui.Example.Raylib.Raylib-cs.exe" />
<configuration default="false" name="Example | Raylib - Raylib-cs" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/src/Examples/Raylib/CopperDevs.DearImGui.Example.Raylib.Raylib-cs/bin/Debug/net8.0/CopperDevs.DearImGui.Example.Raylib.Raylib-cs" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/src/Examples/Raylib/CopperDevs.DearImGui.Example.Raylib.Raylib-cs/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Example - Sparkle" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/src/Examples/Library/CopperDevs.DearImGui.Example.Sparkle/bin/Debug/net8.0/CopperDevs.DearImGui.Example.Sparkle.exe" />
<configuration default="false" name="Example | Sparkle" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/src/Examples/Library/CopperDevs.DearImGui.Example.Sparkle/bin/Debug/net8.0/CopperDevs.DearImGui.Example.Sparkle" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/src/Examples/Library/CopperDevs.DearImGui.Example.Sparkle/bin/Debug/net8.0" />
<option name="PASS_PARENT_ENVS" value="1" />
Expand Down
6 changes: 6 additions & 0 deletions .run/Publish _ Bliss.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Publish | Bliss" type="DotNetFolderPublish" factoryName="Publish to folder">
<riderPublish configuration="Release" platform="Any CPU" runtime="Portable" target_folder="$PROJECT_DIR$/src/Renderers/Library/CopperDevs.DearImGui.Renderer.Bliss/bin/Release/net9.0/publish" target_framework="net9.0" uuid_high="-7029197294403434104" uuid_low="-7014505541461700871" />
<method v="2" />
</configuration>
</component>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Publish - Core" type="DotNetFolderPublish" factoryName="Publish to folder">
<configuration default="false" name="Publish | Core" type="DotNetFolderPublish" factoryName="Publish to folder">
<riderPublish configuration="Release" platform="Any CPU" runtime="Portable" target_folder="$PROJECT_DIR$/src/Core/CopperDevs.DearImGui/bin/Release/net8.0/publish" target_framework="net8.0" uuid_high="1541310867237388715" uuid_low="-5220530830540174629" />
<method v="2" />
</configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Publish - OpenGl (Silk.Net)" type="DotNetFolderPublish" factoryName="Publish to folder">
<configuration default="false" name="Publish | OpenGl - Silk.Net" type="DotNetFolderPublish" factoryName="Publish to folder">
<riderPublish configuration="Release" platform="Any CPU" runtime="Portable" target_folder="$PROJECT_DIR$/src/Renderers/OpenGl/CopperDevs.DearImGui.Renderer.OpenGl.SilkNet/bin/Release/net8.0/publish" target_framework="net8.0" uuid_high="-5121785347594303619" uuid_low="-6965404481678504450" />
<method v="2" />
</configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Publish - Raylib-CSharp Renderer" type="DotNetFolderPublish" factoryName="Publish to folder">
<configuration default="false" name="Publish | Raylib - Raylib-CSharp Renderer" type="DotNetFolderPublish" factoryName="Publish to folder">
<riderPublish configuration="Release" platform="Any CPU" runtime="Portable" target_folder="$PROJECT_DIR$/src/Renderers/Raylib/CopperDevs.DearImGui.Renderer.Raylib.Raylib-CSharp/bin/Release/net8.0/publish" target_framework="net8.0" uuid_high="-7076885502142233198" uuid_low="-7352315353011297057" />
<method v="2" />
</configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Publish - Raylib-CSharp-Vinculum Renderer" type="DotNetFolderPublish" factoryName="Publish to folder">
<configuration default="false" name="Publish | Raylib - Raylib-CSharp-Vinculum" type="DotNetFolderPublish" factoryName="Publish to folder">
<riderPublish configuration="Release" platform="Any CPU" runtime="Portable" target_folder="$PROJECT_DIR$/src/Renderers/Raylib/CopperDevs.DearImGui.Renderer.Raylib.Raylib-CSharp-Vinculum/bin/Release/net8.0/publish" target_framework="net8.0" uuid_high="-3407282353646843145" uuid_low="-4903897953479510967" />
<method v="2" />
</configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Publish - Raylib-cs Renderer" type="DotNetFolderPublish" factoryName="Publish to folder">
<configuration default="false" name="Publish | Raylib - Raylib-cs" type="DotNetFolderPublish" factoryName="Publish to folder">
<riderPublish configuration="Release" platform="Any CPU" runtime="Portable" target_folder="$PROJECT_DIR$/src/Renderers/Raylib/CopperDevs.DearImGui.Renderer.Raylib.Raylib-cs/bin/Release/net8.0/publish" target_framework="net8.0" uuid_high="-9075661100937557409" uuid_low="-7718519248318287510" />
<method v="2" />
</configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Publish - Raylib Core" type="DotNetFolderPublish" factoryName="Publish to folder">
<configuration default="false" name="Publish | Raylib" type="DotNetFolderPublish" factoryName="Publish to folder">
<riderPublish configuration="Release" platform="Any CPU" runtime="Portable" target_folder="$PROJECT_DIR$/src/Renderers/Raylib/CopperDevs.DearImGui.Renderer.Raylib/bin/Release/net8.0/publish" target_framework="net8.0" uuid_high="-2137627242336533829" uuid_low="-8873139651121421337" />
<method v="2" />
</configuration>
Expand Down
1 change: 1 addition & 0 deletions .run/Publish all projects.run.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Publish all projects" type="CompoundRunConfigurationType">
<toRun name="Publish - Bliss" type="DotNetFolderPublish" />
<toRun name="Publish - Core" type="DotNetFolderPublish" />
<toRun name="Publish - OpenGl (Silk.Net)" type="DotNetFolderPublish" />
<toRun name="Publish - Raylib Core" type="DotNetFolderPublish" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Testing - Core" type="DotNetProject" factoryName=".NET Project">
<configuration default="false" name="Testing | Core" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/src/Core/CopperDevs.DearImGui.Testing/bin/Debug/net8.0/CopperDevs.DearImGui.Testing" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/src/Core/CopperDevs.DearImGui.Testing/bin/Debug/net8.0" />
Expand Down
17 changes: 17 additions & 0 deletions CopperDevs.DearImGui.sln
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CopperDevs.DearImGui.Exampl
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CopperDevs.DearImGui.Example.Raylib.Raylib-CSharp-Vinculum", "src\Examples\Raylib\CopperDevs.DearImGui.Example.Raylib.Raylib-CSharp-Vinculum\CopperDevs.DearImGui.Example.Raylib.Raylib-CSharp-Vinculum.csproj", "{CB536AF6-86A5-449A-9E2B-CEB6446547DE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Library", "Library", "{30D16054-850F-4B3B-BAB1-187D50E0D87C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CopperDevs.DearImGui.Example.Bliss", "src\Examples\Library\CopperDevs.DearImGui.Example.Bliss\CopperDevs.DearImGui.Example.Bliss.csproj", "{20DD99E6-1DB4-4110-A5EB-09C0C15276CA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CopperDevs.DearImGui.Renderer.Bliss", "src\Renderers\Library\CopperDevs.DearImGui.Renderer.Bliss\CopperDevs.DearImGui.Renderer.Bliss.csproj", "{9E73464D-92F2-4988-9EA7-785FDE2A8EF9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -118,6 +124,14 @@ Global
{CB536AF6-86A5-449A-9E2B-CEB6446547DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CB536AF6-86A5-449A-9E2B-CEB6446547DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CB536AF6-86A5-449A-9E2B-CEB6446547DE}.Release|Any CPU.Build.0 = Release|Any CPU
{20DD99E6-1DB4-4110-A5EB-09C0C15276CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{20DD99E6-1DB4-4110-A5EB-09C0C15276CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{20DD99E6-1DB4-4110-A5EB-09C0C15276CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{20DD99E6-1DB4-4110-A5EB-09C0C15276CA}.Release|Any CPU.Build.0 = Release|Any CPU
{9E73464D-92F2-4988-9EA7-785FDE2A8EF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9E73464D-92F2-4988-9EA7-785FDE2A8EF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9E73464D-92F2-4988-9EA7-785FDE2A8EF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E73464D-92F2-4988-9EA7-785FDE2A8EF9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{BCB5D11D-AC1A-4B7A-9415-BD38C8FA6584} = {D80512F7-C352-4BD7-99A8-2D380494B3E8}
Expand All @@ -140,5 +154,8 @@ Global
{6A8A9C0C-F2E8-48A8-9FC2-9B041E381B6D} = {C58E73B1-33D4-4C9C-97D9-59FCBCDAB7D1}
{C98F8037-E5E1-4DD0-99EF-1522DA861A06} = {C58E73B1-33D4-4C9C-97D9-59FCBCDAB7D1}
{CB536AF6-86A5-449A-9E2B-CEB6446547DE} = {C58E73B1-33D4-4C9C-97D9-59FCBCDAB7D1}
{30D16054-850F-4B3B-BAB1-187D50E0D87C} = {D80512F7-C352-4BD7-99A8-2D380494B3E8}
{20DD99E6-1DB4-4110-A5EB-09C0C15276CA} = {4223FF19-0D8A-4F4B-A056-A1FDFC0602F7}
{9E73464D-92F2-4988-9EA7-785FDE2A8EF9} = {30D16054-850F-4B3B-BAB1-187D50E0D87C}
EndGlobalSection
EndGlobal
8 changes: 4 additions & 4 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sdk": {
"version": "8.0.10",
"rollForward": "latestMinor",
"allowPrerelease": false
"version": "9.0.0",
"rollForward": "latestMajor",
"allowPrerelease": true
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Core\CopperDevs.DearImGui\CopperDevs.DearImGui.csproj" />
<ProjectReference Include="..\..\..\Renderers\Library\CopperDevs.DearImGui.Renderer.Bliss\CopperDevs.DearImGui.Renderer.Bliss.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Veldrid;

namespace CopperDevs.DearImGui.Example.Bliss.Data;

public record ExampleGameOptions
{
public GraphicsDeviceOptions GraphicsDeviceOptions = new()
{
Debug = false,
HasMainSwapchain = true,
SwapchainDepthFormat = null,
SyncToVerticalBlank = true,
ResourceBindingModel = ResourceBindingModel.Improved,
PreferDepthRangeZeroToOne = true,
PreferStandardClipSpaceYDirection = true,
SwapchainSrgbFormat = false
};

public WindowOptions WindowOptions = new();

public static ExampleGameOptions Default => new();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Bliss.CSharp.Windowing;
using CopperDevs.Core.Data;

namespace CopperDevs.DearImGui.Example.Bliss.Data;

public record WindowOptions
{
public string Title = "Window";
public Vector2Int Size = new(1150, 680);
public WindowState Flags = WindowState.Resizable;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
using Bliss.CSharp.Colors;
using Bliss.CSharp.Interact;
using Bliss.CSharp.Transformations;
using Bliss.CSharp.Windowing;
using CopperDevs.Core.Utility;
using CopperDevs.DearImGui.Example.Bliss.Data;
using CopperDevs.DearImGui.Renderer.Bliss;
using Veldrid;
using BlissWindow = Bliss.CSharp.Windowing.Window;

namespace CopperDevs.DearImGui.Example.Bliss;

public class ExampleGame(ExampleGameOptions options) : SafeDisposable
{
public readonly ExampleGameOptions Options = options;

private IWindow window = null!;
private GraphicsDevice graphicsDevice = null!;
private CommandList commandList = null!;

public void Setup()
{
window = BlissWindow.CreateWindow(WindowType.Sdl3,
Options.WindowOptions.Size.X,
Options.WindowOptions.Size.Y,
Options.WindowOptions.Title,
Options.WindowOptions.Flags,
Options.GraphicsDeviceOptions,
BlissWindow.GetPlatformDefaultBackend(),
out graphicsDevice);

commandList = graphicsDevice.ResourceFactory.CreateCommandList();

window.Resized += OnResize;

BlissRenderer.SetupReferences(window, graphicsDevice, commandList);
CopperImGui.Setup<BlissRenderer>(RenderingSettings.DockingEnabled | RenderingSettings.UseCustomStyling);
}

public void Run()
{
while (window.Exists)
{
window.PumpEvents();
Input.Begin();

if (!window.Exists)
{
break;
}

Update();
}
}

private void Update()
{
commandList.Begin();
commandList.SetFramebuffer(graphicsDevice.SwapchainFramebuffer);
commandList.ClearColorTarget(0, Color.DarkGray.ToRgbaFloat());

CopperImGui.Render();

commandList.End();
graphicsDevice.SubmitCommands(commandList);
graphicsDevice.SwapBuffers();
}

protected virtual void OnResize()
{
graphicsDevice.MainSwapchain.Resize((uint)window.GetWidth(), (uint)window.GetHeight());
}

public override void DisposeResources()
{
window.Dispose();
graphicsDevice.Dispose();
CopperImGui.Shutdown();
}
}
15 changes: 15 additions & 0 deletions src/Examples/Library/CopperDevs.DearImGui.Example.Bliss/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using CopperDevs.DearImGui.Example.Bliss.Data;

namespace CopperDevs.DearImGui.Example.Bliss;

public static class Program
{
public static void Main()
{
var options = new ExampleGameOptions();
using var game = new ExampleGame(options);

game.Setup();
game.Run();
}
}
Loading