Holidays 12.10. -> 25.10.2020
~ Moved code around in files. SM.Base: + PostProcessing-system + OnInitialization() for Scenes. + Shader-Extensions + Added option to not react while unfocused to the window. + Added Screenshots to the window. + Connected the log system to the SM.OGL-action system. ~ Replaced IShader with abstract MaterialShader. ~ When a log compression folder doesn't exist, it will create one. SM.OGL: + Added support for UniformArrays + Added ShaderPreProcessing + Added Shader Extensions. + Added Debug actions. + SM.OGL settings ~ Framebuffer Size is automaticly changed, when the window and scale is set. SM2D: + Added easy shader drawing.
This commit is contained in:
parent
2c00dbd31a
commit
03b3942732
102 changed files with 2683 additions and 1398 deletions
|
|
@ -1,30 +1,35 @@
|
|||
using System.Diagnostics;
|
||||
#region usings
|
||||
|
||||
using System.Diagnostics;
|
||||
using OpenTK.Graphics.OpenGL4;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace SM.OGL
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies default object behaviour.
|
||||
/// Specifies default object behaviour.
|
||||
/// </summary>
|
||||
public abstract class GLObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains the OpenGL ID
|
||||
/// Contains the OpenGL ID
|
||||
/// </summary>
|
||||
protected int _id = -1;
|
||||
|
||||
/// <summary>
|
||||
/// If true, the system will call "Compile()", when "ID" is tried to get, but the id is still -1.
|
||||
/// If true, the system will call "Compile()", when "ID" is tried to get, but the id is still -1.
|
||||
/// </summary>
|
||||
protected virtual bool AutoCompile { get; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the object was compiled.
|
||||
/// Checks if the object was compiled.
|
||||
/// </summary>
|
||||
public bool WasCompiled => _id > 0;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the id for this object.
|
||||
/// <para>It will auto compile, if needed and allowed.</para>
|
||||
/// Returns the id for this object.
|
||||
/// <para>It will auto compile, if needed and allowed.</para>
|
||||
/// </summary>
|
||||
public virtual int ID
|
||||
{
|
||||
|
|
@ -36,7 +41,7 @@ namespace SM.OGL
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Identifies the object.
|
||||
/// Identifies the object.
|
||||
/// </summary>
|
||||
public abstract ObjectLabelIdentifier TypeIdentifier { get; }
|
||||
|
||||
|
|
@ -47,21 +52,21 @@ namespace SM.OGL
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// The action, that is called, when "ID" tries to compile something.
|
||||
/// The action, that is called, when "ID" tries to compile something.
|
||||
/// </summary>
|
||||
|
||||
public virtual void Compile()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is triggered, when something want to dispose this object.
|
||||
/// Is triggered, when something want to dispose this object.
|
||||
/// </summary>
|
||||
public virtual void Dispose() {}
|
||||
public virtual void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Re-compiles the object.
|
||||
/// Re-compiles the object.
|
||||
/// </summary>
|
||||
public void Recompile()
|
||||
{
|
||||
|
|
@ -72,7 +77,7 @@ namespace SM.OGL
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Names the object for debugging.
|
||||
/// Names the object for debugging.
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
public void Name(string name)
|
||||
|
|
@ -81,9 +86,12 @@ namespace SM.OGL
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the ID for the object.
|
||||
/// Returns the ID for the object.
|
||||
/// </summary>
|
||||
/// <param name="glo"></param>
|
||||
public static implicit operator int(GLObject glo) => glo.ID;
|
||||
public static implicit operator int(GLObject glo)
|
||||
{
|
||||
return glo.ID;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue