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:
baldurk
2017-04-18 14:57:33 +01:00
parent 71e779a08f
commit d40fc8471d
158 changed files with 6386 additions and 6176 deletions
-6
View File
@@ -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
{
-6
View File
@@ -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);
-4
View File
@@ -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
-4
View File
@@ -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));
});