Added missing summeries #2

This commit is contained in:
Michel Fedde 2021-03-18 10:13:43 +01:00
parent 31777faa11
commit c8db1ce8bc
26 changed files with 261 additions and 36 deletions

View file

@ -12,23 +12,45 @@ using SM.OGL.Texture;
namespace SM.Base.Window
{
/// <summary>
/// This represents a render pipeline.
/// </summary>
public abstract class RenderPipeline : IInitializable
{
/// <summary>
/// This contains the windows its connected to.
/// </summary>
public IGenericWindow ConnectedWindow { get; internal set; }
/// <summary>
/// This should contains the framebuffer, when any back buffer effects are used.
/// </summary>
public Framebuffer MainFramebuffer { get; protected set; }
/// <summary>
/// This list contains all framebuffers that are required to update.
/// </summary>
public List<Framebuffer> Framebuffers { get; } = new List<Framebuffer>();
/// <summary>
/// This contains the default shader.
/// <para>Default: <see cref="SMRenderer.DefaultMaterialShader"/></para>
/// </summary>
public virtual MaterialShader DefaultShader { get; protected set; } = SMRenderer.DefaultMaterialShader;
/// <summary>
/// Here you can set a default material.
/// </summary>
public virtual Material DefaultMaterial { get; protected set; }
/// <inheritdoc/>
public bool IsInitialized { get; set; }
/// <inheritdoc/>
public virtual void Activate()
{
}
/// <inheritdoc/>
public virtual void Initialization()
{
if (MainFramebuffer != null) Framebuffers.Add(MainFramebuffer);
@ -40,8 +62,14 @@ namespace SM.Base.Window
RenderProcess(ref context);
}
/// <summary>
/// The process of rendering.
/// </summary>
protected abstract void RenderProcess(ref DrawContext context);
/// <summary>
/// The event when resizing.
/// </summary>
public virtual void Resize()
{
if (Framebuffers == null) return;
@ -54,6 +82,11 @@ namespace SM.Base.Window
framebuffer.Compile();
}
/// <summary>
/// This creates a finished setup for a framebuffer.
/// </summary>
/// <param name="multisamples"></param>
/// <returns></returns>
public Framebuffer CreateWindowFramebuffer(int multisamples = 0)
{
Framebuffer framebuffer = new Framebuffer(ConnectedWindow);