expose GraphicsDevice.DebugMode
parent
217ae96888
commit
8813a0139d
|
@ -15,6 +15,7 @@ namespace MoonWorks.Graphics
|
|||
{
|
||||
public IntPtr Handle { get; }
|
||||
public Backend Backend { get; }
|
||||
public bool DebugMode { get; }
|
||||
|
||||
private uint windowFlags;
|
||||
public SDL2.SDL.SDL_WindowFlags WindowFlags => (SDL2.SDL.SDL_WindowFlags) windowFlags;
|
||||
|
@ -61,6 +62,7 @@ namespace MoonWorks.Graphics
|
|||
Conversions.BoolToByte(debugMode)
|
||||
);
|
||||
|
||||
DebugMode = debugMode;
|
||||
// TODO: check for CreateDevice fail
|
||||
|
||||
// Check for replacement stock shaders
|
||||
|
|
|
@ -22,12 +22,16 @@ namespace MoonWorks.Graphics
|
|||
get => name;
|
||||
|
||||
set
|
||||
{
|
||||
if (Device.DebugMode)
|
||||
{
|
||||
Refresh.Refresh_SetGpuBufferName(
|
||||
Device.Handle,
|
||||
Handle,
|
||||
value
|
||||
);
|
||||
}
|
||||
|
||||
name = value;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,12 +26,16 @@ namespace MoonWorks.Graphics
|
|||
get => name;
|
||||
|
||||
set
|
||||
{
|
||||
if (Device.DebugMode)
|
||||
{
|
||||
Refresh.Refresh_SetTextureName(
|
||||
Device.Handle,
|
||||
Handle,
|
||||
value
|
||||
);
|
||||
}
|
||||
|
||||
name = value;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue