Skip to content

Add multi-window service containers - #383

Open
botoddly wants to merge 1 commit into
mainfrom
multi-window-containers
Open

Add multi-window service containers#383
botoddly wants to merge 1 commit into
mainfrom
multi-window-containers

Conversation

@botoddly

Copy link
Copy Markdown
Collaborator

Implements the first multi-window delivery discussed in #382.

Summary

  • add explicit-window application roots and per-window child service containers
  • publish window sessions into root-owned rendering and SDL event coordination
  • keep render managers, render phases, keyboard, mouse, and text input window-local
  • split stable logical Window state from native ActivationWindow state
  • make GraphicsPipelineBuilder transient so inherited resolution uses the requesting window container
  • preserve the current implicit single-window composition model
  • migrate the multi-window tutorial to sibling containers sharing root-owned GPU data
  • keep StageManager application-scoped

Window reactivation and secondary-window Pencuil composition remain follow-up work.

Verification

  • dotnet build GameKit.slnx --no-restore
  • dotnet test GameKit.slnx --no-restore
  • dotnet build tutorials/GameKit.Tutorials.MultiWindow/GameKit.Tutorials.MultiWindow.csproj --no-restore
  • git diff --check

Graphical SDL execution was intentionally not added to the automated suite.

Comment thread src/GameKit.DependencyInjection/ServiceCollection.cs Outdated
Comment thread src/GameKit.RenderOrchestration/GameKitAppBuilderExtensions.cs Outdated
Comment thread src/GameKit/App/IRenderPhase.cs Outdated
Comment thread src/GameKit/App/RenderScheduler.cs Outdated

namespace GameKit.App;

internal sealed class RenderScheduler

@stanoddly stanoddly Aug 10, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like the name is strange, it's not schedule per se. It's just executing them in certain order, one by one. It's somehow a render manager of render managers.

Also, Publish and Unpublish sound really odd.

Comment thread src/GameKit/EventService.cs Outdated

if (windowId == 0)
{
session = null!;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forcing a non nullable item to be null? Not good.

Comment thread src/GameKit/GameKit.csproj Outdated

<ItemGroup>
<InternalsVisibleTo Include="GameKit.Tests" />
<InternalsVisibleTo Include="GameKit.RenderOrchestration" />

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fishy.

Comment thread src/GameKit/GameKitFactory.cs Outdated
if (title == null)
{
using var process = System.Diagnostics.Process.GetCurrentProcess();
using System.Diagnostics.Process process = System.Diagnostics.Process.GetCurrentProcess();

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants