public int UniformLocation(string uniform_name) { int location = gl.GetUniformLocationString(ProgramId, uniform_name); if (location < 0) { throw new InvalidOperationException($"No uniform {uniform_name}"); } return(location); }