ShaderProgram.SetUniform1 does not work for int uniforms
Open
- Dominant language
- C#
- Stars
- 804
- Forks
- 294
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 1
Description
This statement does not change the integer uniform:
```
shaderProgram.SetUniform1(gl, "my_texture", 1);
```
This one works orrectly:
```
gl.Uniform1(shaderProgram.GetUniformLocation(gl, "my_texture"), 1);
```
The problem with the first statement is that the third parameter of `SetUniform1` is declared as `float`, so if an `int` value is passed,
it is typecasted to float before the call to `gl.Uniform1`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.