Esempio n. 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;
		}
Esempio n. 2
0
			public RenderBufferAttachment(RenderBuffer buffer)
			{
				if (buffer == null)
					throw new ArgumentNullException("buffer");

				Buffer = buffer;
				Buffer.IncRef();
			}
Esempio n. 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));
		}
Esempio n. 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);
		}
Esempio n. 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);
		}
Esempio n. 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);
 }
Esempio n. 7
0
 public void RenderBuffer(uint attachment, RenderBuffer buffer) =>
 Gl.NamedFramebufferRenderbuffer(_hdc, attachment, Gl.RenderBuffer, buffer?.Raw() ?? 0);