diff --git a/src/renderer/SM.OGL/Framebuffer/ColorAttachment.cs b/src/renderer/SM.OGL/Framebuffer/ColorAttachment.cs
index d95c6e1..7ef84e4 100644
--- a/src/renderer/SM.OGL/Framebuffer/ColorAttachment.cs
+++ b/src/renderer/SM.OGL/Framebuffer/ColorAttachment.cs
@@ -28,6 +28,10 @@ namespace SM.OGL.Framebuffer
///
public Framebuffer ConnectedFramebuffer { get; private set; }
+ ///
+ /// Can contains the size this attachment want to be.
+ /// If set, it will ignore the size from the framebuffer.
+ ///
public Vector2? AttachmentSize = null;
///
@@ -56,6 +60,7 @@ namespace SM.OGL.Framebuffer
/// Creates a attachment with a specific id.
///
///
+ ///
public ColorAttachment(int attachmentId, Vector2? size = null) : this(attachmentId, PixelInformation.RGBA_LDR, size)
{ }
@@ -64,6 +69,7 @@ namespace SM.OGL.Framebuffer
///
///
///
+ ///
///
public ColorAttachment(int attachmentID, PixelInformation pixelInformation, Vector2? size = null, int multisamples = 0)
{
diff --git a/src/renderer/SM.OGL/Framebuffer/Framebuffer.cs b/src/renderer/SM.OGL/Framebuffer/Framebuffer.cs
index da98b79..6a817de 100644
--- a/src/renderer/SM.OGL/Framebuffer/Framebuffer.cs
+++ b/src/renderer/SM.OGL/Framebuffer/Framebuffer.cs
@@ -50,8 +50,14 @@ namespace SM.OGL.Framebuffer
///
public Vector2 Size { get; private set; }
+ ///
+ /// Says what value the dafault for the "applyViewport"-value in .
+ ///
public bool DefaultApplyViewport { get; set; } = true;
+ ///
+ /// Stores the first color attachment added.
+ ///
public ColorAttachment FirstColorAttachment { get; private set; }
///
@@ -171,6 +177,12 @@ namespace SM.OGL.Framebuffer
/// Appends a color attachment.
///
public void Append(string key, int pos) => Append(key, new ColorAttachment(pos, null));
+ ///
+ /// Appends a color attachment.
+ ///
+ ///
+ ///
+ ///
public void Append(string key, Vector2 size, int pos) => Append(key, new ColorAttachment(pos, size));
///
/// Appends a color attachment.
@@ -203,6 +215,7 @@ namespace SM.OGL.Framebuffer
/// Activates the framebuffer for the specific target framebuffer and without clearing.
///
///
+ ///
public void Activate(FramebufferTarget target, bool? applyViewport = null)
{
Activate(target, ClearBufferMask.None, applyViewport);
@@ -212,6 +225,7 @@ namespace SM.OGL.Framebuffer
/// Activates the framebuffer while clearing the specified buffer.
///
///
+ ///
public void Activate(ClearBufferMask clearMask, bool? applyViewport = null)
{
Activate(FramebufferTarget.Framebuffer, clearMask, applyViewport);
@@ -222,6 +236,7 @@ namespace SM.OGL.Framebuffer
///
///
///
+ ///
public void Activate(FramebufferTarget target, ClearBufferMask clear, bool? applyViewport = null)
{
switch (target)
diff --git a/src/renderer/SM.OGL/Framebuffer/RenderbufferAttachment.cs b/src/renderer/SM.OGL/Framebuffer/RenderbufferAttachment.cs
index aa35c13..de00fb9 100644
--- a/src/renderer/SM.OGL/Framebuffer/RenderbufferAttachment.cs
+++ b/src/renderer/SM.OGL/Framebuffer/RenderbufferAttachment.cs
@@ -81,5 +81,16 @@ namespace SM.OGL.Framebuffer
return false;
}
+
+ ///
+ public override int GetHashCode()
+ {
+ int hashCode = -1803239493;
+ hashCode = hashCode * -1521134295 + Storage.GetHashCode();
+ hashCode = hashCode * -1521134295 + FramebufferAttachment.GetHashCode();
+ hashCode = hashCode * -1521134295 + Multisample.GetHashCode();
+ hashCode = hashCode * -1521134295 + ID.GetHashCode();
+ return hashCode;
+ }
}
}
\ No newline at end of file
diff --git a/src/renderer/SM.OGL/Texture/TextureBase.cs b/src/renderer/SM.OGL/Texture/TextureBase.cs
index b496f6d..524c528 100644
--- a/src/renderer/SM.OGL/Texture/TextureBase.cs
+++ b/src/renderer/SM.OGL/Texture/TextureBase.cs
@@ -53,7 +53,14 @@ namespace SM.OGL.Texture
///
public virtual int Height { get; protected set; }
+ ///
+ /// Returns the size of the texture.
+ ///
public Vector2 Size => new Vector2(Width, Height);
+ ///
+ /// Returns the texel size of the texture.
+ /// Returns: 1 / Size
+ ///
public Vector2 TexelSize => new Vector2(1f / Width, 1f / Height);
///
@@ -63,6 +70,10 @@ namespace SM.OGL.Texture
base.Dispose();
}
+ ///
+ /// Generates a basic texture, that applies all settings from the -class.
+ ///
+ ///
protected void GenerateBaseTexture(Vector2 size)
{
Width = (int)size.X;