示例#1
0
 public void UseProgram()
 {
     GLBind.UseProgram(programID);
 }
示例#2
0
 internal void Bind()
 {
     GLBind.VertexArray(VAO);
 }
示例#3
0
 public override void BindTo(int unit)
 {
     GLBind.BindTexture(unit, GL.GL_TEXTURE_CUBE_MAP, ID);
 }
示例#4
0
 public void SetMatrix(int loc, ref Matrix4 mat)
 {
     GLBind.UseProgram(programID);
     SetMatrixInternal(loc, ref mat);
 }
示例#5
0
 public void UniformMatrix4fv(string name, ref Matrix4 mat)
 {
     GLBind.UseProgram(ID);
     GL.UniformMatrix4fv(GL.GetUniformLocation(ID, name), 1, false, ref mat);
 }
示例#6
0
 public void Dispatch(uint groupsX, uint groupsY, uint groupsZ)
 {
     GLBind.UseProgram(ID);
     GL.DispatchCompute(groupsX, groupsY, groupsZ);
 }
示例#7
0
 public void Uniform1i(string name, int i)
 {
     GLBind.UseProgram(ID);
     GL.Uniform1i(GL.GetUniformLocation(ID, name), i);
 }
示例#8
0
 public void Uniform2i(string name, Point pt)
 {
     GLBind.UseProgram(ID);
     GL.Uniform2i(GL.GetUniformLocation(ID, name), pt.X, pt.Y);
 }
示例#9
0
 public void TrashGLState()
 {
     GLBind.Trash();
     RenderState.Instance.Trash();
 }
示例#10
0
 public void UnbindAll()
 {
     GLBind.VertexArray(RenderState.Instance.NullVAO);
 }
示例#11
0
 public unsafe void SetVector3Array(int loc, Vector3 *values, int count)
 {
     GLBind.UseProgram(programID);
     GL.Uniform3fv(loc, count, (IntPtr)values);
 }
示例#12
0
 public void UnbindAll()
 {
     GLBind.VertexArray(0);
     GLBind.VertexBuffer(0);
 }
示例#13
0
 public void SetMatrix(int loc, IntPtr mat)
 {
     GLBind.UseProgram(programID);
     GL.UniformMatrix4fv(loc, 1, false, mat);
 }