mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 08:23:15 +00:00
GRAPHICS: OPENGL: added another setUniform function to set an uniform value in shaders from an array of ints
This commit is contained in:
parent
a01431838d
commit
7a96738168
@ -131,6 +131,17 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
bool setUniform(const Common::String &uniform, const int size, const int *array) {
|
||||
GLint pos = getUniformLocation(uniform);
|
||||
if (pos != -1) {
|
||||
use();
|
||||
GL_CALL(glUniform1iv(pos, size, array));
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Different name to avoid overload ambiguity
|
||||
bool setUniform1f(const Common::String &uniform, float f) {
|
||||
GLint pos = getUniformLocation(uniform);
|
||||
|
Loading…
x
Reference in New Issue
Block a user