feat(rendering): add Shader.SetFloat uniform setter
This commit is contained in:
@@ -36,6 +36,9 @@ public sealed class Shader : IDisposable
|
||||
public void SetInt(string name, int value) =>
|
||||
GL.Uniform1(this.Location(name), value);
|
||||
|
||||
public void SetFloat(string name, float value) =>
|
||||
GL.Uniform1(this.Location(name), value);
|
||||
|
||||
private int Location(string name)
|
||||
{
|
||||
if (this._uniforms.TryGetValue(name, out int location)) return location;
|
||||
|
||||
Reference in New Issue
Block a user