/// <summary> /// Links a vertex and fragment shader together to create a shader program. /// </summary> /// <param name="vertexShader">Specifies the vertex shader.</param> /// <param name="fragmentShader">Specifies the fragment shader.</param> public ShaderProgram(Shader vertexShader, Shader fragmentShader) { this.VertexShader = vertexShader; this.FragmentShader = fragmentShader; this.ProgramID = Gl.CreateProgram(); this.DisposeChildren = false; Gl.AttachShader(ProgramID, vertexShader.ShaderID); Gl.AttachShader(ProgramID, fragmentShader.ShaderID); Gl.LinkProgram(ProgramID); GetParams(); }