/// <summary> /// Detaches the shader. /// </summary> /// <param name="shader">The shader.</param> public void DetachShader(Shader shader) { // Detach the shader. CurrentOpenGLContext.DetachShader(ProgramObject, shader.ShaderObject); // Remove it from the list. attachedShaders.Remove(shader); }
/// <summary> /// Attaches a shader. /// </summary> /// <param name="shader">The shader.</param> public void AttachShader(Shader shader) { // Attach the shader. CurrentOpenGLContext.AttachShader(ProgramObject, shader.ShaderObject); // Add it to the list. attachedShaders.Add(shader); }
/// <summary> /// Compiles this instance. /// </summary> public void Compile() { // Compile the shader. CurrentOpenGLContext.CompileShader(ShaderObject); }
/// <summary> /// Sets the shader source. /// </summary> /// <param name="source">The source.</param> public void SetSource(string source) { // Set the shader source. CurrentOpenGLContext.ShaderSource(ShaderObject, source); }
/// <summary> /// Links this instance. /// </summary> public void Link() { // Link the program. CurrentOpenGLContext.LinkProgram(ProgramObject); }
/// <summary> /// Gets the uniform location. /// </summary> /// <param name="name">The name.</param> /// <returns></returns> public int GetUniformLocation(string name) { // Get the uniform location. return(CurrentOpenGLContext.GetUniformLocation(ProgramObject, name)); }