26 Sep 2021

General:
+ Added Summaries

Renderer
-------
SM.Base:
+ SM.Base.Controls.Mouse now has a feature to disable tracking.
+ Replaced Bloom Effect with the similar system how blender use it.
+ You can now disable ANY post processing effects.
+ Interpolation for CVectors.
+ MathUtils
+ RenderPipelines now have a central list for post processing effects.

~ Log-System is now ignored if a debugger is attached.
~ Post Processing Shader does now send the texel size as the "renderedTextureTexelSize"-uniform.
~ Improved Text Rendering

SM.OGL:
+ ColorAttachments now contain a reference to the framebuffer its connected.
+ ColorAttachments can now have a own size.
+ Framebuffer.Append(string key, Vector2 size, int pos)
+Framebuffers now have a method to completely reset itself.
+ Framebuffers now have a Blit-method called "CopyTo".

~ Framebuffer.GetCurrentlyActive() will now return an actual SM.OGL.Framebuffer-object.
~ Renderbuffers now are a class and contain the ID by itself.
~ Renamed Uniform-function to its class-name: f.E. SetBool, SetFloat instead of SetUniform1

Optionals:
Controls:
+ Framecache for the GameController.GetState()
This commit is contained in:
Nineto Nine 2021-09-26 21:27:14 +02:00
parent dffa581596
commit 9b52d401e7
61 changed files with 1529 additions and 818 deletions

View file

@ -1,6 +1,8 @@
#region usings
using OpenTK;
using OpenTK.Graphics.OpenGL4;
using System;
#endregion
@ -10,6 +12,7 @@ namespace SM.OGL.Texture
/// Works as a basis for textures.
/// </summary>
public abstract class TextureBase : GLObject
{
/// <inheritdoc />
protected override bool AutoCompile { get; set; } = true;
@ -50,11 +53,35 @@ namespace SM.OGL.Texture
/// </summary>
public virtual int Height { get; protected set; }
public Vector2 Size => new Vector2(Width, Height);
public Vector2 TexelSize => new Vector2(1f / Width, 1f / Height);
/// <inheritdoc />
public override void Dispose()
{
GL.DeleteTexture(_id);
base.Dispose();
}
protected void GenerateBaseTexture(Vector2 size)
{
Width = (int)size.X;
Height = (int)size.Y;
GL.BindTexture(TextureTarget.Texture2D, _id);
GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInformation.InternalFormat,
Width, Height, 0,
PixelInformation.Format, PixelInformation.DataType, IntPtr.Zero);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)Filter);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)Filter);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS,
(int)WrapMode);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT,
(int)WrapMode);
GL.BindTexture(TextureTarget.Texture2D, 0);
}
}
}