Add set_param_mat3.

This commit is contained in:
2022-12-27 06:20:18 +01:00
parent ad2e89f684
commit af0edd5e6d
3 changed files with 20 additions and 0 deletions

View File

@ -569,6 +569,17 @@ void rk_set_param_vec3(
}
}
void rk_set_param_mat3(
rk_param_t _param,
rk_mat3 const & value) {
GLint const param = reinterpret_cast<intptr_t>(_param) - 1;
if (rk_current_shader && param > -1) {
glVertexAttrib3fv(param + 0, glm::value_ptr(value[0]));
glVertexAttrib3fv(param + 1, glm::value_ptr(value[1]));
glVertexAttrib3fv(param + 2, glm::value_ptr(value[2]));
}
}
void rk_select_texture(
rk_uint slot,
rk_texture_t _texture,