public static ExtShaderProgram CreateShader(OpenGL gl, IShaderParameterIds parameters, string nameOfShaderFiles) { string vertexShaderPath = ShaderProperties.ShaderPath + nameOfShaderFiles + ShaderProperties.VertexShaderExtension; string fragmentShaderPath = ShaderProperties.ShaderPath + nameOfShaderFiles + ShaderProperties.FragmentShaderExtension; return(CreateShader(gl, parameters, vertexShaderPath, fragmentShaderPath)); }
/// <summary> /// Create and add a new ShaderProgram from the given sources. /// Call this function if you decide to add your own shaders. /// </summary> /// <param name="gl">The OpenGL</param> /// <param name="vertexShaderSource">The path to the vertex shader code.</param> /// <param name="fragmentShaderSource">The path to the fragment shader code.</param> /// <param name="shaderName">The name for the shader.</param> public static ExtShaderProgram CreateShader(OpenGL gl, IShaderParameterIds parameters, string vertexShaderSource, string fragmentShaderSource) { // Create the per pixel shader. ShaderProgram shader = new ShaderProgram(); shader.Create(gl, ManifestResourceLoader.LoadTextFile(vertexShaderSource), ManifestResourceLoader.LoadTextFile(fragmentShaderSource), _attributeLocations); return new ExtShaderProgram(shader, parameters); }
/// <summary> /// Create and add a new ShaderProgram from the given sources. /// Call this function if you decide to add your own shaders. /// </summary> /// <param name="gl">The OpenGL</param> /// <param name="vertexShaderSource">The path to the vertex shader code.</param> /// <param name="fragmentShaderSource">The path to the fragment shader code.</param> /// <param name="shaderName">The name for the shader.</param> public static ExtShaderProgram CreateShader(OpenGL gl, IShaderParameterIds parameters, string vertexShaderSource, string fragmentShaderSource) { // Create the per pixel shader. ShaderProgram shader = new ShaderProgram(); shader.Create(gl, ManifestResourceLoader.LoadTextFile(vertexShaderSource), ManifestResourceLoader.LoadTextFile(fragmentShaderSource), _attributeLocations); return(new ExtShaderProgram(shader, parameters)); }
public static ExtShaderProgram CreateShader(OpenGL gl, IShaderParameterIds parameters, string nameOfShaderFiles) { string vertexShaderPath = ShaderProperties.ShaderPath + nameOfShaderFiles + ShaderProperties.VertexShaderExtension; string fragmentShaderPath = ShaderProperties.ShaderPath + nameOfShaderFiles + ShaderProperties.FragmentShaderExtension; return CreateShader(gl, parameters, vertexShaderPath, fragmentShaderPath); }
public ExtShaderProgram(ShaderProgram program, IShaderParameterIds parameters) { Program = program; Parameters = parameters; }
/// <summary> /// Deletes the shaderprogram van the GL and clears the parameters of this object. /// </summary> public void Dispose() { Program.Delete(_gl); Program = null; Parameters = null; }
public ExtShaderProgram(ShaderProgram program, IShaderParameterIds parameters) { Program = program; Parameters = parameters; }