16.09.2020

~ Fixed shading import
~ Fixed "Plate" mesh
~ Move the dll files into "SMCode"
This commit is contained in:
Michel Fedde 2020-09-16 19:12:53 +02:00
parent 421d03f91d
commit 9889366317
27 changed files with 30 additions and 17 deletions

View file

@ -1,34 +0,0 @@
using OpenTK.Graphics.OpenGL4;
namespace SM.OGL.Shaders
{
public struct ShaderFileCollection
{
public ShaderFile Vertex;
public ShaderFile Geometry;
public ShaderFile Fragment;
public ShaderFileCollection(string vertex, string fragment) : this(new ShaderFile(vertex), new ShaderFile(fragment)) {}
public ShaderFileCollection(ShaderFile vertex, ShaderFile fragment, ShaderFile geometry = default)
{
Vertex = vertex;
Geometry = geometry;
Fragment = fragment;
}
internal void Append(GenericShader shader)
{
Vertex.Compile(shader, ShaderType.VertexShader);
Geometry?.Compile(shader, ShaderType.GeometryShader);
Fragment.Compile(shader, ShaderType.FragmentShader);
}
internal void Detach(GenericShader shader)
{
GL.DetachShader(Vertex, shader);
if (Geometry != null) GL.DetachShader(Geometry, shader);
GL.DetachShader(Fragment, shader);
}
}
}