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