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
|
||||
|
|
|
@ -23,11 +23,15 @@ namespace MoonWorks.Graphics
|
|||
|
||||
set
|
||||
{
|
||||
Refresh.Refresh_SetGpuBufferName(
|
||||
Device.Handle,
|
||||
Handle,
|
||||
value
|
||||
);
|
||||
if (Device.DebugMode)
|
||||
{
|
||||
Refresh.Refresh_SetGpuBufferName(
|
||||
Device.Handle,
|
||||
Handle,
|
||||
value
|
||||
);
|
||||
}
|
||||
|
||||
name = value;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,15 @@ namespace MoonWorks.Graphics
|
|||
|
||||
set
|
||||
{
|
||||
Refresh.Refresh_SetTextureName(
|
||||
Device.Handle,
|
||||
Handle,
|
||||
value
|
||||
);
|
||||
if (Device.DebugMode)
|
||||
{
|
||||
Refresh.Refresh_SetTextureName(
|
||||
Device.Handle,
|
||||
Handle,
|
||||
value
|
||||
);
|
||||
}
|
||||
|
||||
name = value;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue