Reworked RenderTarget2D and corresponding API

This commit is contained in:
Simon Lübeß
2021-09-21 16:30:34 +02:00
parent 8e39d7988b
commit 229d2b578e
11 changed files with 178 additions and 36 deletions
@@ -6,7 +6,8 @@ namespace GlitchyEngine.Renderer
D16_UNorm,
D24_UNorm_S8_UInt,
D32_Float,
D32_Float_S8X24_UInt
D32_Float_S8X24_UInt,
None
}
// TODO: add all features.
@@ -23,6 +24,8 @@ namespace GlitchyEngine.Renderer
public this(GraphicsContext context, uint32 width, uint32 height, DepthStencilFormat format = .D32_Float)
{
Log.EngineLogger.Assert(format != .None, "DepthStencilFormat None is only valid for RenderTarget");
_context = context..AddRef();
_width = width;
_height = height;