Added missing summeries #1
This commit is contained in:
parent
03d99ea28e
commit
8665b5b709
104 changed files with 1165 additions and 821 deletions
|
|
@ -2,15 +2,33 @@
|
|||
|
||||
namespace SM.OGL.Framebuffer
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes a renderbuffer attachment.
|
||||
/// </summary>
|
||||
public struct RenderbufferAttachment
|
||||
{
|
||||
/// <summary>
|
||||
/// Preset for the depthbuffer attachment.
|
||||
/// </summary>
|
||||
public static readonly RenderbufferAttachment Depth = new RenderbufferAttachment(RenderbufferStorage.Depth24Stencil8, FramebufferAttachment.DepthStencilAttachment);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Storage describes the internal format for the renderbuffer.
|
||||
/// </summary>
|
||||
public RenderbufferStorage Storage;
|
||||
/// <summary>
|
||||
/// FramebufferAttachment describes the attachment for the framebuffer.
|
||||
/// </summary>
|
||||
public FramebufferAttachment FramebufferAttachment;
|
||||
|
||||
/// <summary>
|
||||
/// This contains the amount of multisampling for the attachment.
|
||||
/// </summary>
|
||||
public int Multisample;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public RenderbufferAttachment(RenderbufferStorage storage, FramebufferAttachment framebufferAttachment, int multisample = 0)
|
||||
{
|
||||
Storage = storage;
|
||||
|
|
@ -18,18 +36,23 @@ namespace SM.OGL.Framebuffer
|
|||
Multisample = multisample;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This generates the renderbuffer for the framebuffer to add.
|
||||
/// </summary>
|
||||
/// <param name="f">The framebuffer</param>
|
||||
/// <returns>The ID of the renderbuffer.</returns>
|
||||
public int Generate(Framebuffer f)
|
||||
{
|
||||
int rbo = GL.GenRenderbuffer();
|
||||
int rb = GL.GenRenderbuffer();
|
||||
|
||||
GL.BindRenderbuffer(RenderbufferTarget.Renderbuffer, rbo);
|
||||
GL.BindRenderbuffer(RenderbufferTarget.Renderbuffer, rb);
|
||||
if (Multisample != 0)
|
||||
GL.RenderbufferStorageMultisample(RenderbufferTarget.Renderbuffer, Multisample, Storage, (int)f.Size.X, (int)f.Size.Y);
|
||||
else
|
||||
GL.RenderbufferStorage(RenderbufferTarget.Renderbuffer, Storage, (int)f.Size.X, (int)f.Size.Y);
|
||||
GL.BindRenderbuffer(RenderbufferTarget.Renderbuffer, 0);
|
||||
|
||||
return rbo;
|
||||
return rb;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue