add a few useful functions
							parent
							
								
									66d363459b
								
							
						
					
					
						commit
						2bd88e1dc1
					
				| 
						 | 
					@ -281,6 +281,24 @@ namespace MoonWorks.Graphics
 | 
				
			||||||
			StencilStoreOp = StoreOp.DontCare;
 | 
								StencilStoreOp = StoreOp.DontCare;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							public DepthStencilAttachmentInfo(
 | 
				
			||||||
 | 
								Texture texture,
 | 
				
			||||||
 | 
								LoadOp loadOp = LoadOp.DontCare,
 | 
				
			||||||
 | 
								StoreOp storeOp = StoreOp.Store,
 | 
				
			||||||
 | 
								LoadOp stencilLoadOp = LoadOp.DontCare,
 | 
				
			||||||
 | 
								StoreOp stencilStoreOp = StoreOp.Store
 | 
				
			||||||
 | 
							) {
 | 
				
			||||||
 | 
								Texture = texture;
 | 
				
			||||||
 | 
								Depth = 0;
 | 
				
			||||||
 | 
								Layer = 0;
 | 
				
			||||||
 | 
								Level = 0;
 | 
				
			||||||
 | 
								DepthStencilClearValue = new DepthStencilValue();
 | 
				
			||||||
 | 
								LoadOp = loadOp;
 | 
				
			||||||
 | 
								StoreOp = storeOp;
 | 
				
			||||||
 | 
								StencilLoadOp = stencilLoadOp;
 | 
				
			||||||
 | 
								StencilStoreOp = stencilStoreOp;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		public Refresh.DepthStencilAttachmentInfo ToRefresh()
 | 
							public Refresh.DepthStencilAttachmentInfo ToRefresh()
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			return new Refresh.DepthStencilAttachmentInfo
 | 
								return new Refresh.DepthStencilAttachmentInfo
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,6 +8,12 @@
 | 
				
			||||||
		public VertexBinding[] VertexBindings;
 | 
							public VertexBinding[] VertexBindings;
 | 
				
			||||||
		public VertexAttribute[] VertexAttributes;
 | 
							public VertexAttribute[] VertexAttributes;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							public VertexInputState()
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								VertexBindings = new VertexBinding[0];
 | 
				
			||||||
 | 
								VertexAttributes = new VertexAttribute[0];
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		public VertexInputState(
 | 
							public VertexInputState(
 | 
				
			||||||
			VertexBinding vertexBinding,
 | 
								VertexBinding vertexBinding,
 | 
				
			||||||
			params VertexAttribute[] vertexAttributes
 | 
								params VertexAttribute[] vertexAttributes
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -280,6 +280,11 @@ namespace MoonWorks.Math
 | 
				
			||||||
			return result;
 | 
								return result;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							public static float Quantize(float value, float step)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								return (float) System.Math.Floor(value / step) * step;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/// <summary>
 | 
							/// <summary>
 | 
				
			||||||
		/// Converts radians to degrees.
 | 
							/// Converts radians to degrees.
 | 
				
			||||||
		/// </summary>
 | 
							/// </summary>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue