Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VL.ImGui.Stride.Viewports] #673

Open
wants to merge 60 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
09bf3cc
BUGFIX:
kopffarben Mar 12, 2024
9ee818e
BUGFIX:
kopffarben Mar 12, 2024
482e798
working SceneWidget and remove Properties/launchSettings.json
kopffarben Mar 12, 2024
93ec848
WIP RenderWidget with IInputSource Out
kopffarben Mar 14, 2024
3e251e6
WIP
kopffarben Mar 19, 2024
a065910
WIP CleanUp
kopffarben Mar 19, 2024
aede9c9
WIP
kopffarben Mar 20, 2024
e423c20
Merge remote-tracking branch 'remotes/origin/main' into feature/VL.Im…
kopffarben Mar 20, 2024
fdc69fb
WIP
kopffarben Mar 20, 2024
1318fee
Merge remote-tracking branch 'remotes/origin/main' into feature/VL.Im…
kopffarben Mar 20, 2024
4d30715
WIP
kopffarben Mar 20, 2024
e53e513
WIP
kopffarben Mar 21, 2024
75dffb6
WIP
kopffarben Mar 25, 2024
74d07a3
WIP
kopffarben Mar 27, 2024
04d9e0d
Merge remote-tracking branch 'remotes/origin/main' into feature/VL.Im…
kopffarben Mar 27, 2024
53688ac
WIP
kopffarben Mar 27, 2024
163e258
CleanUP
kopffarben Mar 27, 2024
9edf8bd
remove InputManager from StrideContext ... not needed
kopffarben Apr 4, 2024
f28bf90
Merge remote-tracking branch 'remotes/origin/main' into feature/VL.Im…
kopffarben Apr 4, 2024
893137c
Move Stride Pipeline Stuff to StrideDeviceContext
kopffarben Apr 4, 2024
777c985
CleanUp
kopffarben Apr 5, 2024
4a57a14
WIP
kopffarben Apr 5, 2024
d2410ea
WIP
kopffarben Apr 13, 2024
347b9f3
WIP first buggy working version ...
kopffarben Apr 13, 2024
7011c91
Working Version for Viewports
kopffarben Apr 14, 2024
0f363eb
some CleanUp
kopffarben Apr 14, 2024
4cfd87a
Merge remote-tracking branch 'remotes/origin/main' into feature/VL.Im…
kopffarben Apr 15, 2024
e27cb98
SkiaRendererWithOffset
kopffarben Apr 15, 2024
9e05b53
WIP
kopffarben Apr 16, 2024
060c2d2
ADD Bound to Document
kopffarben Apr 16, 2024
cd90ed0
revert launchSettings.json
kopffarben Apr 16, 2024
9d77ae2
Closing MainWindow will close all other Windows
kopffarben Apr 16, 2024
c78d9ab
Add MousButtons to globalMouseState
kopffarben Apr 16, 2024
60e4025
Merge remote-tracking branch 'remotes/origin/main' into feature/VL.Im…
kopffarben May 3, 2024
d9d4a7a
WIP fixed null ref on Closeing
kopffarben May 3, 2024
57254be
fix InputSource Handeling
kopffarben May 3, 2024
2b92219
[ImGui.Stride] Gets rid of earlier introduced hack by using same code…
azeno May 23, 2024
679e1f8
VL.ImGui.Stride TargetFramework net8.0-windows
kopffarben May 23, 2024
6f46662
Merge remote-tracking branch 'remotes/origin/main' into feature/VL.Im…
kopffarben May 23, 2024
bdafce1
[VL.ImGui.Skia]
kopffarben May 23, 2024
cec33a3
Merge remote-tracking branch 'remotes/origin/bugfix/issue-672' into f…
kopffarben May 23, 2024
524c1a8
IMappedDevice add SetSourceDevice
kopffarben May 30, 2024
71e475a
Merge branch 'main' into feature/VL.ImGui.Stride.Viewports
kopffarben Aug 28, 2024
a71b894
small bug-fix
kopffarben Aug 28, 2024
aa800be
BugFix InputManager.Remove ... breaks after a while
kopffarben Aug 29, 2024
0d538d9
WIP
kopffarben Sep 4, 2024
3c8c945
Add Option for Constructor(NodeContext nodeContext) to SourceGenerato…
kopffarben Nov 5, 2024
72f9f29
Merge remote-tracking branch 'remotes/origin/main' into feature/VL.Im…
kopffarben Nov 5, 2024
6d3f50d
fix move to second screen ... DesktopBounds from Stride for second Sc…
kopffarben Nov 6, 2024
085b92a
revert launchSettings.json
kopffarben Nov 6, 2024
c171198
Merge remote-tracking branch 'remotes/origin/main' into feature/VL.Im…
kopffarben Dec 13, 2024
fda0109
so improvements in ImGuiWindows.cs
kopffarben Dec 13, 2024
5623600
Refactor and improve resource management
kopffarben Dec 16, 2024
a461a82
Add UniqueId to RenderWidget for unique naming
kopffarben Dec 16, 2024
28975d5
Enhance ImGui functionality and layout
kopffarben Dec 16, 2024
2197d3e
Nicer Layout
kopffarben Dec 17, 2024
5311019
Merge remote-tracking branch 'remotes/origin/main' into feature/VL.Im…
kopffarben Dec 18, 2024
ddfc695
Work on Helppatch
kopffarben Dec 18, 2024
831f878
Bugfix KeyboardInput
kopffarben Jan 13, 2025
f859daf
Merge remote-tracking branch 'remotes/origin/main' into feature/VL.Im…
kopffarben Jan 13, 2025
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
11 changes: 1 addition & 10 deletions VL.Core.Skia/Egl/EglDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,7 @@ public static unsafe EglDevice NewD3D11()
{
D3D_FEATURE_LEVEL featureLevels = D3D_FEATURE_LEVEL.D3D_FEATURE_LEVEL_11_1;
D3D_FEATURE_LEVEL featureLevel = default;
D3D11_CREATE_DEVICE_FLAG flags = default;

if (Array.Exists(Environment.GetCommandLineArgs(), argument => argument == "--debug-gpu"))
flags |= D3D11_CREATE_DEVICE_FLAG.D3D11_CREATE_DEVICE_DEBUG;

Windows.Win32.PInvoke.D3D11CreateDevice(null, D3D_DRIVER_TYPE.D3D_DRIVER_TYPE_HARDWARE, default, flags, &featureLevels, 1, 7, out var device, &featureLevel, out var context);
if (device is null)
Windows.Win32.PInvoke.D3D11CreateDevice(null, D3D_DRIVER_TYPE.D3D_DRIVER_TYPE_HARDWARE, default, flags, default, 0, 7, out device, &featureLevel, out context);
if (device is null)
throw new Exception("Failed to create D3D11 device");
Windows.Win32.PInvoke.D3D11CreateDevice(null, D3D_DRIVER_TYPE.D3D_DRIVER_TYPE_HARDWARE, default, default, &featureLevels, 1, 7, out var device, &featureLevel, out var context);

var angleDevice = NativeEgl.eglCreateDeviceANGLE(NativeEgl.EGL_D3D11_DEVICE_ANGLE, Marshal.GetIUnknownForObject(device), null);
if (angleDevice == default)
Expand Down
4 changes: 0 additions & 4 deletions VL.Core/src/IVLObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1108,10 +1108,6 @@ public static TInstance WithValueByPath<TInstance, TValue>(this TInstance instan
o = o.WithValueByPath(rest, value, out pathExists);
return vlObj.WithValue(property, o) as TInstance;
}
if (pathExists && rest == "")
{
return vlObj.WithValue(property, value) as TInstance;
}
}
return instance;
}
Expand Down
179 changes: 14 additions & 165 deletions VL.CoreLib/AppControl.vl

Large diffs are not rendered by default.

52 changes: 1 addition & 51 deletions VL.CoreLib/CoreLibBasics.vl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Document xmlns:p="property" xmlns:r="reflection" Id="Of1O6bGyfkeP2GcHemIYTM" LanguageVersion="2024.6.7-0305-g04c2aff42c" Version="0.128">
<Document xmlns:p="property" xmlns:r="reflection" Id="Of1O6bGyfkeP2GcHemIYTM" LanguageVersion="2024.6.7-0263-gf1cd46ff87" Version="0.128">
<PlatformDependency Id="JGjOHljIj0OMEtwdbxK5co" Location="mscorlib.dll" />
<PlatformDependency Id="PYIqYtnKICvNvf8OUid9an" Location="System.Core.dll" />
<PlatformDependency Id="GWqlKlg7mZVLez3rUAusYf" Location="System.Drawing.dll" />
Expand Down Expand Up @@ -115421,54 +115421,6 @@
<Pin Id="N0r7HVAz37SNpfq3YxN0xn" Name="Success" Kind="OutputPin" />
</Patch>
</Node>
<!--

************************ NULL (OrDefault) ************************

-->
<Node Name="NULL (OrDefault)" Bounds="194,668,127,82" Id="JNMKnajc8fDLTqkOVtwkEP">
<p:NodeReference>
<Choice Kind="OperationDefinition" Name="Operation" />
<CategoryReference Kind="Category" Name="Primitive" />
</p:NodeReference>
<p:HideCategory p:Type="Boolean">false</p:HideCategory>
<Patch Id="G9o4J1kFTRqNjtLejEsXR3" IsGeneric="true">
<Node Bounds="206,700,103,19" AutoConnect="true" Id="VZSeKReudQeQa9t6htqyRG">
<p:NodeReference LastCategoryFullName="VL.Lib.Primitive.Object.ObjectHelpers" LastDependency="VL.CoreLib.dll">
<Choice Kind="OperationNode" Name="NULL_OR_DEFAULT" />
<FullNameCategoryReference ID="VL.Lib.Primitive.Object.ObjectHelpers" />
</p:NodeReference>
<Pin Id="UBTtBjbA6NkMMdgcbMuIuB" Name="Result" Kind="OutputPin" />
</Node>
<Pin Id="Qfhmj6itZXhMXbUr4rLQcC" Name="Result" Kind="OutputPin" />
</Patch>
</Node>
<!--

************************ CastAs (Slim) ************************

-->
<Node Name="CastAs (Slim)" Bounds="778,101,112,82" Id="IWffFZrPybhLbinyzaFLvg">
<p:NodeReference>
<Choice Kind="OperationDefinition" Name="Operation" />
<CategoryReference Kind="Category" Name="Primitive" />
</p:NodeReference>
<p:HideCategory p:Type="Boolean">false</p:HideCategory>
<Patch Id="TX0I57tQIICO3Wcn6aYWE3" IsGeneric="true">
<Node Bounds="790,133,71,19" AutoConnect="true" Id="RongUDEI5woLjpYiCmzFnH">
<p:NodeReference LastCategoryFullName="VL.Lib.Primitive.Object.ObjectHelpers" LastDependency="VL.CoreLib.dll">
<Choice Kind="OperationNode" Name="CastAs_Slim" />
<FullNameCategoryReference ID="VL.Lib.Primitive.Object.ObjectHelpers" />
</p:NodeReference>
<Pin Id="S7kJW6vMmejP2wVnT1ZKih" Name="Input" Kind="InputPin" />
<Pin Id="EAjDsquh626LvXiXll2sE3" Name="Result" Kind="OutputPin" />
<Pin Id="NsuiEkvxKmKNuxYprorUWQ" Name="Success" Kind="OutputPin" />
</Node>
<Pin Id="P2NoQSXxzwtMSVpLZxWjjr" Name="Input" Kind="InputPin" />
<Pin Id="RFANgydzwxyMLGbXatDBXe" Name="Result" Kind="OutputPin" />
<Pin Id="EROrXJDe9ICMwZGv6sWYto" Name="Success" Kind="OutputPin" />
</Patch>
</Node>
</Canvas>
<ProcessDefinition Id="Sqf5Nf8xhfoLA56OraNS1G" IsHidden="true">
<Fragment Id="UYRczy7YYOZPoPHiCze622" Patch="MZHNDkjFeMaNIS1rfMuZpH" Enabled="true" />
Expand All @@ -115484,8 +115436,6 @@
<Fragment Id="JnWLl49vMUtPEvWwPxguLJ" Patch="QWvVK2xcLjxM6q8kn7K34W" />
<Fragment Id="EZ9ssOV2KVqNKkoiKLmJ7a" Patch="SqGsrHDBRhEPr6tiigJpWQ" />
<Fragment Id="OpbKxwLDaANNwly3rTxFtt" Patch="BpXU052kCt8L0BT9JdN97v" />
<Fragment Id="QMJB4UlYgl9LA0wVC9ofMv" Patch="JNMKnajc8fDLTqkOVtwkEP" />
<Fragment Id="GVsEIUXKiAdNB0jHQq6wh9" Patch="IWffFZrPybhLbinyzaFLvg" />
</ProcessDefinition>
</Patch>
</Node>
Expand Down
19 changes: 1 addition & 18 deletions VL.CoreLib/src/Primitive/Object.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace VL.Lib.Primitive.Object
{
public static class ObjectHelpers
{
public static T NULL<T>() // why no class constraint?
public static T NULL<T>()
{
var result = default(T);
if (result != null)
Expand All @@ -19,11 +19,6 @@ public static T NULL<T>() // why no class constraint?
return result;
}

/// <summary>
/// NULL in case of reference type, unitialized in case of value type, e.g. (0,0,0,0) for a vector4
/// </summary>
public static T NULL_OR_DEFAULT<T>() => default;

/// <summary>
/// Whether or not the value is null
/// </summary>
Expand Down Expand Up @@ -73,18 +68,6 @@ public static void CastAs<T>(object input, T @default, out T result, out bool su
IHotswapSpecificNodes.Impl.CastAs(input, @default, out result, out success);
}

/// <summary>
/// Casts the input value to the downstream connected type. In case the cast fails the result will be unassigned or unitialized in case of a value type
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="input"></param>
/// <param name="result"></param>
/// <param name="success"></param>
public static void CastAs_Slim<T>(object input, out T result, out bool success)
{
IHotswapSpecificNodes.Impl.CastAs(input, default, out result, out success);
}

/// <summary>
/// Casts the input value to the downstream connected type. In case the cast fails the provided default value will be used and the success output will return false
/// </summary>
Expand Down
7 changes: 6 additions & 1 deletion VL.ImGui.Generator/SourceGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ bool SkipProperty(IPropertySymbol property)
outputs.Insert(0, "c.Output(() => s),");
}


bool hasConstructorWithNodeContext = typeSymbol.InstanceConstructors.Any(constructor => constructor.Parameters.Length == 1 && constructor.Parameters.First().Type.Name == "NodeContext");

string ctxPara = hasConstructorWithNodeContext ? "c.NodeContext" : default;

return $@"
using VL.Core;

Expand All @@ -275,7 +280,7 @@ partial class {typeSymbol.Name}
_outputs,
c =>
{{
var s = new {typeSymbol.Name}();
var s = new {typeSymbol.Name}({ctxPara});
{ctx}
var inputs = new IVLPin[]
{{
Expand Down
20 changes: 15 additions & 5 deletions VL.ImGui.Skia/VL.ImGui.Skia.vl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Document xmlns:p="property" xmlns:r="reflection" Id="TlT19thZkWBLG3AeB1o51b" LanguageVersion="2025.7.0-0001-g6b60ffd713" Version="0.128">
<Document xmlns:p="property" xmlns:r="reflection" Id="TlT19thZkWBLG3AeB1o51b" LanguageVersion="2024.6.6-0015-g036f3dadd2" Version="0.128">
<NugetDependency Id="VhB7WKzvhePMf39iI7QXfi" Location="VL.CoreLib" Version="2022.5.0-0242-g24c47d850a" />
<Patch Id="BOyXNpSNoNrL6ruhCCKXUI">
<Canvas Id="HsOyX1PVDwwNtqm2mCK746" CanvasType="FullCategory">
Expand Down Expand Up @@ -283,7 +283,7 @@
<Pin Id="GM2G94fcLsoOMoM5B2IbQQ" Name="Output" Kind="StateOutputPin" />
</Node>
<Pad Id="JS7RX1yqKG3OxgliPcpJF1" SlotId="E3NhKEJ14lON0a6kjHZT38" Bounds="375,249" />
<Node Bounds="463,541,105,26" Id="Q9wASeeZdxZLEOQdzIeMYw">
<Node Bounds="463,541,85,26" Id="Q9wASeeZdxZLEOQdzIeMYw">
<p:NodeReference LastCategoryFullName="VL.ImGui.ToSkiaLayer" LastDependency="VL.ImGui.Skia.dll">
<Choice Kind="NodeFlag" Name="Node" Fixed="true" />
<CategoryReference Kind="AssemblyCategory" Name="ToSkiaLayer" />
Expand All @@ -293,7 +293,6 @@
<Pin Id="JyQg0debCYHPJWFC8Lyihp" Name="Widget" Kind="InputPin" />
<Pin Id="KKvom6WPpjFLZEGqpBQFx9" Name="Docking Enabled" Kind="InputPin" />
<Pin Id="IEqpcTBoh5CNHrvUmDPKRM" Name="Fonts" Kind="InputPin" />
<Pin Id="DazCkLOJTX3OefR1EDWfgn" Name="Fullscreen Window" Kind="InputPin" />
<Pin Id="RKHdH0yYrGAPzD3Q2uRoF7" Name="Style" Kind="InputPin" />
<Pin Id="LJnQu66UX4fQIZ4ylY21tg" Name="Output" Kind="StateOutputPin" />
<Pin Id="VQholQeECiHMST1yJABnno" Name="Result" Kind="OutputPin" />
Expand All @@ -311,6 +310,16 @@
</Node>
<ControlPoint Id="CBVpW3IJTPHPeoLN48hqb3" Bounds="555,475" />
<ControlPoint Id="FDCjtWQ1CDwN1ENeggc1YV" Bounds="661,311" />
<Node Bounds="464,375,98,26" Id="Q5UZnBQBNxcN3SB1XCbqlh">
<p:NodeReference LastCategoryFullName="VL.ImGui.ToSkiaLayer" LastDependency="VL.ImGui.Skia.dll">
<Choice Kind="NodeFlag" Name="Node" Fixed="true" />
<CategoryReference Kind="AssemblyCategory" Name="ToSkiaLayer" />
<Choice Kind="OperationCallFlag" Name="SetDefaultWindow" />
</p:NodeReference>
<Pin Id="MeCLTIMYBUpN6j9xssz1Xc" Name="Input" Kind="StateInputPin" />
<Pin Id="Pkl6NGGbYkgMvjio8gfOCx" Name="Value" Kind="InputPin" />
<Pin Id="CA31dWrbASUPRanW63uHTM" Name="Output" Kind="StateOutputPin" />
</Node>
<ControlPoint Id="IsznmuzPQZJPV4EublpwOp" Bounds="571,495" />
<ControlPoint Id="MogqovdveiZNR9E1gKU064" Bounds="800,310" />
</Canvas>
Expand All @@ -328,6 +337,9 @@
<Link Id="H3qLwkVdV39PxUuW8xFGS8" Ids="CBVpW3IJTPHPeoLN48hqb3,KKvom6WPpjFLZEGqpBQFx9" />
<Link Id="BYIGiDgNYdiMhCvwoJDoSN" Ids="SLeskRGCc8fN4tpZSsp7PI,CBVpW3IJTPHPeoLN48hqb3" IsHidden="true" />
<Link Id="PhRfWBbWKd8M66XZQ7fc4J" Ids="PyUuxaRBgXyPV9htgY2CjC,FDCjtWQ1CDwN1ENeggc1YV" IsHidden="true" />
<Link Id="M7hQM28BL6ZMA95Ury2aSX" Ids="JS7RX1yqKG3OxgliPcpJF1,MeCLTIMYBUpN6j9xssz1Xc" />
<Link Id="ThFPnnIxGovLxxrFIjVH2T" Ids="FDCjtWQ1CDwN1ENeggc1YV,Pkl6NGGbYkgMvjio8gfOCx" />
<Link Id="TfEHXETgnTcNVCOVWHfK18" Ids="CA31dWrbASUPRanW63uHTM,VBqnatUK0hpLaRGJIBkaLO" />
<Link Id="L9VTfVILadPPW3W3OqcWEV" Ids="IsznmuzPQZJPV4EublpwOp,IEqpcTBoh5CNHrvUmDPKRM" />
<Link Id="Qr71bDD1xMxOUG5Bp4COD6" Ids="GgJV9LivH2MNnwwLjVMxhn,IsznmuzPQZJPV4EublpwOp" IsHidden="true" />
<Patch Id="HTcjYVojQb0M5nDP7whhdK" Name="Create" ParticipatingElements="Ny7nCZCLstDPmpMKAHUUz9" />
Expand All @@ -342,8 +354,6 @@
<Patch Id="Slhf9cd70JUNUwaF4MlA1X" Name="Dispose" ParticipatingElements="P8olqq3EPEALXDSNRDQmgt" />
<Link Id="JAE3yTMEwuiMaRGXEhjIOi" Ids="MogqovdveiZNR9E1gKU064,RKHdH0yYrGAPzD3Q2uRoF7" />
<Link Id="GfOWjOiKNFTO3nIehiah7F" Ids="HnuG8LvtsSPP1MpSZ0p1qc,MogqovdveiZNR9E1gKU064" IsHidden="true" />
<Link Id="Ca2yKJPBK5KMPx13HSbp8s" Ids="FDCjtWQ1CDwN1ENeggc1YV,DazCkLOJTX3OefR1EDWfgn" />
<Link Id="Q22cEPLkkMaN27BRqEfBsF" Ids="JS7RX1yqKG3OxgliPcpJF1,VBqnatUK0hpLaRGJIBkaLO" />
</Patch>
</Node>
<!--
Expand Down
13 changes: 4 additions & 9 deletions VL.ImGui.Skia/src/SkiaWidget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,20 @@ protected override void Draw(Context context, in ImDrawListPtr drawList, in Syst
//if (context.DrawList == DrawList.AtCursor)
// ImGui.Image(0, size);

// because we use Callback instead of Image


drawList.AddCallback(id, IntPtr.Zero);
}
}

[Pin(Ignore = true)]
public RectangleF? Bounds => !_disposed ? Layer?.Bounds : default;

// What is this for?
//SKMatrix? trans;

public void Render(CallerInfo caller)
{
if (_disposed || Layer is null)
return;
//trans = caller.Transformation;
Layer.Render(caller);
}

Expand All @@ -82,11 +81,7 @@ public bool Notify(INotification notification, CallerInfo caller)
if (EventFilter == EventFilter.WindowHasFocus && !_windowHasFocus)
return false;


//if (trans != null)
// return Layer.Notify(notification, caller.WithTransformation((SKMatrix)trans));
//else
return Layer.Notify(notification, caller); ;
return Layer.Notify(notification, caller); ;
}

public void Dispose()
Expand Down
15 changes: 7 additions & 8 deletions VL.ImGui.Skia/src/ToSkiaLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public void Dispose()

readonly ImGuiIOPtr _io;

public bool DefaultWindow = true;

// OpenGLES rendering (https://github.com/dotnet/Silk.NET/tree/v2.15.0/src/OpenGL/Extensions/Silk.NET.OpenGL.Extensions.ImGui)
private readonly SkiaContext _context;
private readonly RenderContext _renderContext;
Expand Down Expand Up @@ -69,7 +71,7 @@ public unsafe ToSkiaLayer()
}
}

public ILayer Update(Widget widget, bool dockingEnabled, Spread<FontConfig?> fonts, bool fullscreenWindow, IStyle? Style)
public ILayer Update(Widget widget, bool dockingEnabled, Spread<FontConfig?> fonts, IStyle? Style)
{
if (_lastCallerInfo is null)
return this;
Expand All @@ -92,14 +94,12 @@ public ILayer Update(Widget widget, bool dockingEnabled, Spread<FontConfig?> fon
else
_io.ConfigFlags &= ~ImGuiConfigFlags.DockingEnable;

var onlySomeStyles = _context.ApplyStyle(Style, beforeNewFrame: true);

_context.NewFrame();
try
{
using var _ = _context.ApplyStyle(Style);

if (fullscreenWindow)
if (DefaultWindow)
{
var viewPort = ImGui.GetMainViewport();
if (dockingEnabled)
Expand All @@ -120,13 +120,12 @@ public ILayer Update(Widget widget, bool dockingEnabled, Spread<FontConfig?> fon
}

_context.SetDrawList(DrawList.Foreground);
// ImGui.ShowDemoWindow();
_context.Update(widget);
}
finally
{
onlySomeStyles.Dispose();

if (fullscreenWindow && !dockingEnabled)
if (DefaultWindow && !dockingEnabled)
{
ImGui.End();
}
Expand Down Expand Up @@ -342,7 +341,7 @@ public bool Notify(INotification notification, CallerInfo caller)
{
using (_context.MakeCurrent())
{
_io.HandleNotification(notification, useWorldSpace: true);
_io.HandleNotification(notification);

foreach (var layer in _context.Layers)
{
Expand Down
2 changes: 1 addition & 1 deletion VL.ImGui.Skia/src/ToSkiaLayerVersion1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public bool Notify(INotification notification, CallerInfo caller)
{
using (_context.MakeCurrent())
{
_io.HandleNotification(notification, useWorldSpace: true);
_io.HandleNotification(notification);

foreach (var layer in _context.Layers)
{
Expand Down
Loading