Updated Handle and Identifier that default is invalid

This commit is contained in:
2025-12-23 14:22:44 +09:00
parent aa3d9c749b
commit b8ce824292
21 changed files with 268 additions and 221 deletions

View File

@@ -8,9 +8,22 @@ internal class SwapChainTargetStrategy : IRenderTargetStrategy
{
private readonly ISwapChain _swapChain;
public ViewportDesc Viewport
{
get; set;
}
public RectDesc Scissor
{
get; set;
}
public SwapChainTargetStrategy(ISwapChain swapChain)
{
_swapChain = swapChain;
Viewport = new ViewportDesc { Width = swapChain.Width, Height = swapChain.Height, MinDepth = 0, MaxDepth = 1 };
Scissor = new RectDesc { Right = swapChain.Width, Bottom = swapChain.Height };
}
public Handle<Texture> GetRenderTarget()
@@ -38,6 +51,16 @@ internal class TextureTargetStrategy : IRenderTargetStrategy
{
private readonly Handle<Texture> _texture;
public ViewportDesc Viewport
{
get; set;
}
public RectDesc Scissor
{
get; set;
}
public TextureTargetStrategy(Handle<Texture> texture)
{
_texture = texture;
@@ -59,4 +82,4 @@ internal class TextureTargetStrategy : IRenderTargetStrategy
public void Present()
{
}
}
}