protected internal void GlUse(ShaderProgram targetShaderProgram) { Turpgine.Logger.Log(Level.Debug, "Using ShaderProgram " + targetShaderProgram.GetHashCode() + "."); if (!_shaderPrograms.ContainsKey(targetShaderProgram.GetHashCode())) { throw new ArgumentException("Shader Program has not been added to Hash Dictionary."); } targetShaderProgram.Use(); _currentShaderHash = targetShaderProgram.GetHashCode(); }
public void Remove(ShaderProgram shaderProgram) { Turpgine.Logger.Log(Level.Debug, "Removing ShaderProgram " + shaderProgram.GetHashCode() + "."); _shaderPrograms.Remove(shaderProgram.GetHashCode()); }
// TODO Ensure ShaderProgram is not bound to any other manager public void Add(ShaderProgram shaderProgram) { Turpgine.Logger.Log(Level.Debug, "Adding ShaderProgram " + shaderProgram.GetHashCode() + "."); _shaderPrograms.Add(shaderProgram.GetHashCode(), shaderProgram); }