Skip to content

Commit

Permalink
fix some oversights
Browse files Browse the repository at this point in the history
  • Loading branch information
thatcosmonaut committed Jan 16, 2021
1 parent 2e3871a commit fbed91b
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions src/Refresh.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,14 @@ public enum StoreOp
DontCare
}

public enum ClearOptionsBits
[Flags]
public enum ClearOptionsFlags : uint
{
Color = 1,
Depth = 2,
Stencil = 4
Stencil = 4,
DepthStencil = Depth | Stencil,
All = Color | Depth | Stencil
}

public enum IndexElementSize
Expand Down Expand Up @@ -585,8 +588,8 @@ public unsafe struct ColorBlendState
[StructLayout(LayoutKind.Sequential)]
public struct ComputePipelineCreateInfo
{
ShaderStageState computeShaderState;
ComputePipelineLayoutCreateInfo pipelineLayoutCreateInfo;
public ShaderStageState computeShaderState;
public ComputePipelineLayoutCreateInfo pipelineLayoutCreateInfo;
}

[StructLayout(LayoutKind.Sequential)]
Expand Down Expand Up @@ -646,7 +649,7 @@ byte debugMode
IntPtr device,
IntPtr commandBuffer,
ref Rect clearRect,
uint clearOptions,
Refresh.ClearOptionsFlags clearOptions,
ref Color[] colors,
uint colorCount,
float depth,
Expand Down Expand Up @@ -803,13 +806,21 @@ Filter filter
IntPtr buffer
);

[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Refresh_GetBufferData(
IntPtr device,
IntPtr buffer,
IntPtr data,
uint dataLengthInBytes
);

[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Refresh_SetBufferData(
IntPtr device,
IntPtr buffer,
uint offsetInBytes,
IntPtr data,
uint dataLength
uint dataLengthInBytes
);

[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
Expand Down

0 comments on commit fbed91b

Please sign in to comment.