/// <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; }
public RenderBufferAttachment(RenderBuffer buffer) { if (buffer == null) throw new ArgumentNullException("buffer"); Buffer = buffer; Buffer.IncRef(); }
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)); }
/// <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); }
/// <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); }
public void RenderBuffer(uint attachment, RenderBuffer buffer) => Gl.NamedFramebufferRenderbuffer(_hdc, attachment, Gl.RenderBuffer, buffer?.Raw() ?? 0);