// completeoutfile is output of file for debugging /// <summary> /// Compile the program /// </summary> /// <param name="shadertype">Shader type,Fragment, Vertex etc </param> /// <param name="codelisting">The code</param> /// <param name="constvalues">List of constant values to use. Set of {name,value} pairs</param> /// <param name="completeoutfile">If non null, output the post processed code listing to this file</param> /// <returns>Null string if sucessful, or error text</returns> public string Compile(ShaderType shadertype, string codelisting, Object[] constvalues = null, string completeoutfile = null) { GLShader shader = new GLShader(shadertype); string ret = shader.Compile(codelisting, constvalues, completeoutfile); if (ret == null) { Add(shader); return(null); } else { return(ret); } }
/// <summary>Add to program a shader </summary> public void Add(GLShader s) { System.Diagnostics.Debug.Assert(s.Compiled); shaders.Add(s); }