Added summeries to SM.OGL

This commit is contained in:
Michel Fedde 2020-09-27 13:01:50 +02:00
parent 2aa12f8d25
commit 16366fa015
15 changed files with 363 additions and 27 deletions

View file

@ -4,20 +4,35 @@ using OpenTK.Graphics.OpenGL4;
namespace SM.OGL.Shaders
{
/// <summary>
/// Contains/Represents a file used in shaders.
/// </summary>
public class ShaderFile : GLObject
{
private string _data;
/// <inheritdoc />
public override ObjectLabelIdentifier TypeIdentifier { get; } = ObjectLabelIdentifier.Shader;
/// <summary>
/// Contains overrides, that can be used to import values from the CPU to the shader before it is been send to the GPU.
/// </summary>
public Dictionary<string, string> StringOverrides = new Dictionary<string, string>();
/// <summary>
/// Contains other shader files to allow access to their functions.
/// </summary>
public List<ShaderFile> GLSLExtensions = new List<ShaderFile>();
/// <summary>
/// Creates a file.
/// </summary>
/// <param name="data">The source file.</param>
public ShaderFile(string data)
{
_data = data;
}
private void GenerateSource()
{
foreach (KeyValuePair<string, string> kvp in StringOverrides)