add platformer window infrastructure
This commit is contained in:
20
Platformer/Util/Program.cs
Normal file
20
Platformer/Util/Program.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using OpenTK.Graphics.OpenGL4;
|
||||
|
||||
namespace Platformer.Util
|
||||
{
|
||||
public class Program : GlObj
|
||||
{
|
||||
public Program() : base(GL.CreateProgram())
|
||||
{
|
||||
}
|
||||
|
||||
public static Program Link(params Shader[] shaders)
|
||||
{
|
||||
var p = new Program();
|
||||
foreach (var s in shaders)
|
||||
GL.AttachShader(p, s);
|
||||
GL.LinkProgram(p);
|
||||
return p;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user