Separate GraphicsContext from Window, prepare for windows and swap chain for multi window

This commit is contained in:
Simon Lübeß
2024-09-10 19:07:58 +02:00
parent 65992126c0
commit 352073869f
16 changed files with 99 additions and 130 deletions
+15 -1
View File
@@ -8,11 +8,25 @@ namespace GlitchyEngine.Renderer
{
private static GraphicsContext s_GraphicsContext;
public static GraphicsContext Get() => s_GraphicsContext;
private Window _currentWindow;
public extern SwapChain SwapChain {get;}
private bool _immediateContext;
public Window CurrentWindow
{
get => _currentWindow;
set => _currentWindow = value;
}
protected extern void PlatformConstruct();
public this(Window currentWindow, bool immediateContext = false)
{
_currentWindow = currentWindow;
_immediateContext = immediateContext;
}
/**
* The maximum number of simultaneous rendertargets supported.
*/