예제 #1
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="buffer"></param>
		public void AttachStencil(RenderBuffer buffer)
		{
			if (buffer == null)
				throw new ArgumentNullException("buffer");
			if (buffer.BufferType != RenderBuffer.Type.Stencil)
				throw new ArgumentException("buffer is not a stencil buffer type");

			// Reset buffer color attachment
			mStencilBuffer = buffer;
		}
예제 #2
0
			public RenderBufferAttachment(RenderBuffer buffer)
			{
				if (buffer == null)
					throw new ArgumentNullException("buffer");

				Buffer = buffer;
				Buffer.IncRef();
			}
예제 #3
0
		public void AttachDepth(RenderBuffer buffer)
		{
			if (buffer == null)
				throw new ArgumentNullException("buffer");
			if (buffer.BufferType != RenderBuffer.Type.Depth)
				throw new ArgumentException("buffer is not a color buffer type");

			AttachDepth(new RenderBufferAttachment(buffer));
		}
예제 #4
0
		/// <summary>
		/// Attach a render buffer image to color buffer.
		/// </summary>
		/// <param name="buffer">
		/// A <see cref="RenderBuffer"/> which will be used for read/write operation on this RenderFrambuffer.
		/// </param>
		/// <param name="attachmentIndex">
		/// A <see cref="UInt32"/> that specify the framebuffer color attachment index.
		/// </param>
		public void AttachColor(RenderBuffer buffer, uint attachmentIndex)
		{
			if (buffer == null)
				throw new ArgumentNullException("buffer");
			if (buffer.BufferType != RenderBuffer.Type.Color)
				throw new ArgumentException("buffer is not a color buffer type");
			if (attachmentIndex >= GraphicsContext.CurrentCaps.Limits.MaxColorAttachments)
				throw new ArgumentException("attachment index '" + attachmentIndex + "' is greater than the maximum allowed");

			AttachColor(new RenderBufferAttachment(buffer), attachmentIndex);
		}
예제 #5
0
		/// <summary>
		/// Attach a render buffer image to color buffer.
		/// </summary>
		/// <param name="buffer">
		/// A <see cref="RenderBuffer"/> which will be used for read/write operation on this RenderFrambuffer.
		/// </param>
		public void AttachColor(RenderBuffer buffer)
		{
			AttachColor(buffer, 0);
		}
예제 #6
0
 /// <summary>
 /// Attach a render buffer image to color buffer.
 /// </summary>
 /// <param name="buffer">
 /// A <see cref="RenderBuffer"/> which will be used for read/write operation on this RenderFrambuffer.
 /// </param>
 public void AttachColor(RenderBuffer buffer)
 {
     AttachColor(buffer, 0);
 }
예제 #7
0
 public void RenderBuffer(uint attachment, RenderBuffer buffer) =>
 Gl.NamedFramebufferRenderbuffer(_hdc, attachment, Gl.RenderBuffer, buffer?.Raw() ?? 0);