mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-23 22:25:55 +00:00
Change API enums to enum class, remove now redundant prefixing
* This gives a little nicer syntax, a bit better type safety, and also reflects better for SWIG bindings. Overall it's a minor change but better. * We don't update the C# UI at all, since it's soon to be removed and not worth the effort/code churn. * For now so we're ABI compatible with C#, all enums are uint32_t, but that is an obvious optimisation in future to reduce struct packing. * We avoid 'None' as an enum value, because it's a reserved word in python so will cause problems generating bindings.
This commit is contained in:
@@ -314,12 +314,6 @@ namespace renderdoc
|
||||
public UInt64 byteSize;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class OutputConfig
|
||||
{
|
||||
public OutputType m_Type = OutputType.None;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class FetchFrameConstantBindStats
|
||||
{
|
||||
|
||||
@@ -118,8 +118,6 @@ namespace renderdoc
|
||||
|
||||
public class ReplayOutput
|
||||
{
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern bool ReplayOutput_SetOutputConfig(IntPtr real, OutputConfig o);
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern bool ReplayOutput_SetTextureDisplay(IntPtr real, TextureDisplay o);
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
@@ -158,10 +156,6 @@ namespace renderdoc
|
||||
|
||||
public ReplayOutput(IntPtr real) { m_Real = real; }
|
||||
|
||||
public bool SetOutputConfig(OutputConfig o)
|
||||
{
|
||||
return ReplayOutput_SetOutputConfig(m_Real, o);
|
||||
}
|
||||
public bool SetTextureDisplay(TextureDisplay o)
|
||||
{
|
||||
return ReplayOutput_SetTextureDisplay(m_Real, o);
|
||||
|
||||
@@ -203,7 +203,6 @@ namespace renderdocui.Windows
|
||||
|
||||
private byte[] m_Zeroes = null;
|
||||
|
||||
private OutputConfig m_OutConfig = new OutputConfig();
|
||||
private MeshDisplay m_MeshDisplay = new MeshDisplay();
|
||||
|
||||
private IntPtr RenderHandle = IntPtr.Zero;
|
||||
@@ -301,8 +300,6 @@ namespace renderdocui.Windows
|
||||
|
||||
private void ResetConfig()
|
||||
{
|
||||
m_OutConfig.m_Type = OutputType.MeshDisplay;
|
||||
|
||||
m_MeshDisplay = new MeshDisplay();
|
||||
m_MeshDisplay.type = MeshDataStage.VSIn;
|
||||
m_MeshDisplay.fov = 90.0f;
|
||||
@@ -558,7 +555,6 @@ namespace renderdocui.Windows
|
||||
return;
|
||||
|
||||
m_Output = r.CreateOutput(RenderHandle, OutputType.MeshDisplay);
|
||||
m_Output.SetOutputConfig(m_OutConfig);
|
||||
RT_UpdateRenderOutput(r);
|
||||
m_Output.Display(); // pump the display once, this will fetch postvs data
|
||||
|
||||
|
||||
@@ -1090,9 +1090,6 @@ namespace renderdocui.Windows
|
||||
|
||||
public void OnLogfileLoaded()
|
||||
{
|
||||
var outConfig = new OutputConfig();
|
||||
outConfig.m_Type = OutputType.TexDisplay;
|
||||
|
||||
saveTex.Enabled = gotoLocationButton.Enabled = viewTexBuffer.Enabled = true;
|
||||
|
||||
m_Following = Following.Default;
|
||||
@@ -1111,7 +1108,6 @@ namespace renderdocui.Windows
|
||||
{
|
||||
m_Output = r.CreateOutput(renderHandle, OutputType.TexDisplay);
|
||||
m_Output.SetPixelContext(contextHandle);
|
||||
m_Output.SetOutputConfig(outConfig);
|
||||
|
||||
this.BeginInvoke(new Action(UI_CreateThumbnails));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user