Capitalized attachment info struct member names #15
			
				
			
		
		
		
	|  | @ -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 | ||||
|  |  | |||
|  | @ -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; | ||||
| 	} | ||||
| } | ||||
|  |  | |||
|  | @ -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); | ||||
| 
 | ||||
|  |  | |||
|  | @ -5,9 +5,9 @@ namespace MoonWorks.Graphics | |||
| 	/// </summary> | ||||
| 	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; | ||||
| 	} | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue