-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathSeparableShaderProgram.cs
36 lines (33 loc) · 998 Bytes
/
SeparableShaderProgram.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using OpenTK.Graphics.OpenGL;
namespace Core.OpenGLShader
{
public class SeparableShaderProgram : ShaderProgramBase
{
public SeparableShaderProgram()
: base()
{
}
public SeparableShaderProgram(VertexShader vs)
{
GL.ProgramParameter(ProgramObject, ProgramParameterName.ProgramSeparable, (int) 1);
AttachShader(vs);
string Result;
Debug.Assert(LinkProgram(out Result));
CacheShaderProgramInfo();
}
public SeparableShaderProgram(FragmentShader fs)
{
GL.ProgramParameter(ProgramObject, ProgramParameterName.ProgramSeparable, (int)1);
AttachShader(fs);
string Result;
Debug.Assert(LinkProgram(out Result));
CacheShaderProgramInfo();
}
}
}