diff --git a/src/Graphics/CommandBuffer.cs b/src/Graphics/CommandBuffer.cs index b424c104..eab89167 100644 --- a/src/Graphics/CommandBuffer.cs +++ b/src/Graphics/CommandBuffer.cs @@ -58,7 +58,7 @@ namespace MoonWorks.Graphics Refresh.Refresh_BeginRenderPass( Device.Handle, Handle, - colorAttachmentInfos[0].renderTarget.TextureSlice.Rectangle.ToRefresh(), + colorAttachmentInfos[0].RenderTarget.TextureSlice.Rectangle.ToRefresh(), (IntPtr) pColorAttachmentInfos, (uint) colorAttachmentInfos.Length, IntPtr.Zero @@ -106,7 +106,7 @@ namespace MoonWorks.Graphics Refresh.Refresh_BeginRenderPass( Device.Handle, Handle, - colorAttachmentInfos[0].renderTarget.TextureSlice.Rectangle.ToRefresh(), + colorAttachmentInfos[0].RenderTarget.TextureSlice.Rectangle.ToRefresh(), pColorAttachmentInfos, (uint) colorAttachmentInfos.Length, &refreshDepthStencilAttachmentInfo diff --git a/src/Graphics/RefreshStructs.cs b/src/Graphics/RefreshStructs.cs index 6dc6c0b0..8c0602a0 100644 --- a/src/Graphics/RefreshStructs.cs +++ b/src/Graphics/RefreshStructs.cs @@ -102,25 +102,25 @@ namespace MoonWorks.Graphics [StructLayout(LayoutKind.Sequential)] public struct ColorAttachmentInfo { - public RenderTarget renderTarget; - public Color clearColor; - public LoadOp loadOp; - public StoreOp storeOp; + public RenderTarget RenderTarget; + public Color ClearColor; + public LoadOp LoadOp; + public StoreOp StoreOp; public Refresh.ColorAttachmentInfo ToRefresh() { return new Refresh.ColorAttachmentInfo { - renderTarget = renderTarget.Handle, + renderTarget = RenderTarget.Handle, clearColor = new Refresh.Vec4 { - x = clearColor.R / 255f, - y = clearColor.G / 255f, - z = clearColor.B / 255f, - w = clearColor.A / 255f + x = ClearColor.R / 255f, + y = ClearColor.G / 255f, + z = ClearColor.B / 255f, + w = ClearColor.A / 255f }, - loadOp = (Refresh.LoadOp) loadOp, - storeOp = (Refresh.StoreOp) storeOp + loadOp = (Refresh.LoadOp) LoadOp, + storeOp = (Refresh.StoreOp) StoreOp }; } } @@ -128,23 +128,23 @@ namespace MoonWorks.Graphics [StructLayout(LayoutKind.Sequential)] public struct DepthStencilAttachmentInfo { - public RenderTarget depthStencilTarget; - public DepthStencilValue depthStencilValue; - public LoadOp loadOp; - public StoreOp storeOp; - public LoadOp stencilLoadOp; - public StoreOp stencilStoreOp; + public RenderTarget DepthStencilTarget; + public DepthStencilValue DepthStencilValue; + public LoadOp LoadOp; + public StoreOp StoreOp; + public LoadOp StencilLoadOp; + public StoreOp StencilStoreOp; public Refresh.DepthStencilAttachmentInfo ToRefresh() { return new Refresh.DepthStencilAttachmentInfo { - depthStencilTarget = depthStencilTarget.Handle, - depthStencilValue = depthStencilValue.ToRefresh(), - loadOp = (Refresh.LoadOp) loadOp, - storeOp = (Refresh.StoreOp) storeOp, - stencilLoadOp = (Refresh.LoadOp) stencilLoadOp, - stencilStoreOp = (Refresh.StoreOp) stencilStoreOp + depthStencilTarget = DepthStencilTarget.Handle, + depthStencilValue = DepthStencilValue.ToRefresh(), + loadOp = (Refresh.LoadOp) LoadOp, + storeOp = (Refresh.StoreOp) StoreOp, + stencilLoadOp = (Refresh.LoadOp) StencilLoadOp, + stencilStoreOp = (Refresh.StoreOp) StencilStoreOp }; } } @@ -152,7 +152,7 @@ namespace MoonWorks.Graphics [StructLayout(LayoutKind.Sequential)] public struct ColorAttachmentDescription { - public TextureFormat format; - public SampleCount sampleCount; + public TextureFormat Format; + public SampleCount SampleCount; } } diff --git a/src/Graphics/Resources/GraphicsPipeline.cs b/src/Graphics/Resources/GraphicsPipeline.cs index e293229f..cb5458f3 100644 --- a/src/Graphics/Resources/GraphicsPipeline.cs +++ b/src/Graphics/Resources/GraphicsPipeline.cs @@ -59,13 +59,13 @@ namespace MoonWorks.Graphics } var colorAttachmentDescriptions = stackalloc Refresh.ColorAttachmentDescription[ - (int) attachmentInfo.colorAttachmentCount + (int) attachmentInfo.ColorAttachmentCount ]; - for (var i = 0; i < attachmentInfo.colorAttachmentCount; i += 1) + for (var i = 0; i < attachmentInfo.ColorAttachmentCount; i += 1) { - colorAttachmentDescriptions[i].format = (Refresh.TextureFormat) attachmentInfo.colorAttachmentDescriptions[i].format; - colorAttachmentDescriptions[i].sampleCount = (Refresh.SampleCount) attachmentInfo.colorAttachmentDescriptions[i].sampleCount; + colorAttachmentDescriptions[i].format = (Refresh.TextureFormat) attachmentInfo.ColorAttachmentDescriptions[i].Format; + colorAttachmentDescriptions[i].sampleCount = (Refresh.SampleCount) attachmentInfo.ColorAttachmentDescriptions[i].SampleCount; } Refresh.GraphicsPipelineCreateInfo refreshGraphicsPipelineCreateInfo; @@ -125,10 +125,10 @@ namespace MoonWorks.Graphics refreshGraphicsPipelineCreateInfo.primitiveType = (Refresh.PrimitiveType) primitiveType; - refreshGraphicsPipelineCreateInfo.attachmentInfo.colorAttachmentCount = attachmentInfo.colorAttachmentCount; + refreshGraphicsPipelineCreateInfo.attachmentInfo.colorAttachmentCount = attachmentInfo.ColorAttachmentCount; refreshGraphicsPipelineCreateInfo.attachmentInfo.colorAttachmentDescriptions = (IntPtr) colorAttachmentDescriptions; - refreshGraphicsPipelineCreateInfo.attachmentInfo.depthStencilFormat = (Refresh.TextureFormat) attachmentInfo.depthStencilFormat; - refreshGraphicsPipelineCreateInfo.attachmentInfo.hasDepthStencilAttachment = Conversions.BoolToByte(attachmentInfo.hasDepthStencilAttachment); + refreshGraphicsPipelineCreateInfo.attachmentInfo.depthStencilFormat = (Refresh.TextureFormat) attachmentInfo.DepthStencilFormat; + refreshGraphicsPipelineCreateInfo.attachmentInfo.hasDepthStencilAttachment = Conversions.BoolToByte(attachmentInfo.HasDepthStencilAttachment); Handle = Refresh.Refresh_CreateGraphicsPipeline(device.Handle, refreshGraphicsPipelineCreateInfo); diff --git a/src/Graphics/State/GraphicsPipelineAttachmentInfo.cs b/src/Graphics/State/GraphicsPipelineAttachmentInfo.cs index b45845fd..a0789270 100644 --- a/src/Graphics/State/GraphicsPipelineAttachmentInfo.cs +++ b/src/Graphics/State/GraphicsPipelineAttachmentInfo.cs @@ -5,9 +5,9 @@ namespace MoonWorks.Graphics /// public struct GraphicsPipelineAttachmentInfo { - public ColorAttachmentDescription[] colorAttachmentDescriptions; - public uint colorAttachmentCount; - public bool hasDepthStencilAttachment; - public TextureFormat depthStencilFormat; + public ColorAttachmentDescription[] ColorAttachmentDescriptions; + public uint ColorAttachmentCount; + public bool HasDepthStencilAttachment; + public TextureFormat DepthStencilFormat; } }