More errors handling.

This commit is contained in:
2022-12-31 12:26:41 +01:00
parent 6ec993c6f8
commit 2095e335ea
2 changed files with 65 additions and 9 deletions

View File

@ -179,6 +179,9 @@ rk_input_t rk_resolve_input(
return RK_INVALID_HANDLE;
}
GLint const uniform = glGetUniformLocation(shader->program, name);
if (uniform < 0) {
printf("[RK] rk_resolve_input(): uniform %s not found.\n", name);
}
return reinterpret_cast<rk_input_t>(uniform + 1);
}
@ -191,6 +194,9 @@ rk_param_t rk_resolve_param(
return RK_INVALID_HANDLE;
}
GLint const location = glGetAttribLocation(shader->program, name);
if (location < 0) {
printf("[RK] rk_resolve_param(): attrib %s not found.\n", name);
}
return reinterpret_cast<rk_param_t>(location + 1);
}