コード例 #1
0
ファイル: FrameBuffer.cs プロジェクト: kubapelc/glob
 /// <summary>
 /// Attaches a rendertarget to the currently bound framebuffer
 /// Note: framebuffer must be bound first
 /// </summary>
 /// <param name="attachmentPoint"></param>
 /// <param name="attachment"></param>
 public void Attach(FramebufferAttachment attachmentPoint, IRenderTarget attachment)
 {
     if (Attachments.ContainsKey(attachmentPoint))
     {
         Attachments[attachmentPoint] = attachment;
     }
     else
     {
         Attachments.Add(attachmentPoint, attachment);
     }
     attachment.AttachToFramebuffer(FramebufferTarget.DrawFramebuffer, attachmentPoint);
 }