mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-06 05:01:53 +00:00
Fixed DepthStencilTarget
This commit is contained in:
@@ -4,11 +4,28 @@ namespace GlitchyEngine.Renderer
|
||||
{
|
||||
public enum DepthStencilFormat
|
||||
{
|
||||
case Unknown,
|
||||
D16_UNorm,
|
||||
D24_UNorm_S8_UInt,
|
||||
D32_Float,
|
||||
D32_Float_S8X24_UInt,
|
||||
None
|
||||
D32_Float_S8X24_UInt;
|
||||
|
||||
public static Format operator explicit(Self depthFormat)
|
||||
{
|
||||
switch (depthFormat)
|
||||
{
|
||||
case D16_UNorm:
|
||||
return .D16_UNorm;
|
||||
case D24_UNorm_S8_UInt:
|
||||
return .D24_UNorm_S8_UInt;
|
||||
case D32_Float:
|
||||
return .D32_Float;
|
||||
case D32_Float_S8X24_UInt:
|
||||
return .D32_Float_S8X24_UInt;
|
||||
default:
|
||||
return .Unknown;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: add all features.
|
||||
@@ -23,7 +40,7 @@ namespace GlitchyEngine.Renderer
|
||||
|
||||
public this(uint32 width, uint32 height, DepthStencilFormat format = .D32_Float)
|
||||
{
|
||||
Log.EngineLogger.Assert(format != .None, "DepthStencilFormat None is only valid for RenderTarget");
|
||||
Log.EngineLogger.Assert(format != .Unknown, "DepthStencilFormat None is only valid for RenderTarget");
|
||||
|
||||
_width = width;
|
||||
_height = height;
|
||||
|
||||
Reference in New Issue
Block a user