forked from Misaki/GhostEngine
Updated Handle and Identifier that default is invalid
This commit is contained in:
@@ -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()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user