mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-02 12:33:52 +00:00
Improve Shader error messages;
This commit is contained in:
parent
227dd67c00
commit
cc019e5783
|
@ -319,8 +319,9 @@ static void lovrShaderSetUniform(Shader* shader, const char* name, UniformType t
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* plural = (uniform->size / size) > 1 ? "s" : "";
|
||||||
lovrAssert(uniform->type == type, "Unable to send %ss to uniform %s", debug, uniform->name);
|
lovrAssert(uniform->type == type, "Unable to send %ss to uniform %s", debug, uniform->name);
|
||||||
lovrAssert(count * size == uniform->size, "Expected %d %ss for uniform %s, got %d", uniform->count, debug, uniform->name, count);
|
lovrAssert(count * size == uniform->size, "Expected %d %s%s for uniform %s, got %d", uniform->size / size, debug, plural, uniform->name, count);
|
||||||
|
|
||||||
if (!uniform->dirty && !memcmp(uniform->value.data, data, count * size)) {
|
if (!uniform->dirty && !memcmp(uniform->value.data, data, count * size)) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue