mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-10 11:51:52 +00:00
GRAPHICS: Add boolean flag to Shader::use
This commit is contained in:
parent
a768689fbe
commit
132508b683
@ -130,9 +130,9 @@ Shader *Shader::fromFiles(const char *vertex, const char *fragment, const char *
|
||||
return new Shader(name, vertexShader, fragmentShader, attributes);
|
||||
}
|
||||
|
||||
void Shader::use() {
|
||||
void Shader::use(bool forceReload) {
|
||||
static Shader *previousShader = NULL;
|
||||
if (this == previousShader)
|
||||
if (this == previousShader && !forceReload)
|
||||
return;
|
||||
previousShader = this;
|
||||
|
||||
|
@ -64,7 +64,7 @@ public:
|
||||
return new Shader(*this);
|
||||
}
|
||||
|
||||
void use();
|
||||
void use(bool forceReload = false);
|
||||
|
||||
void setUniform(const char *uniform, const Math::Matrix4 &m) {
|
||||
GLint pos = getUniformLocation(uniform);
|
||||
|
Loading…
Reference in New Issue
Block a user