Court is now in session
This commit is contained in:
@ -103,8 +103,8 @@ void shaderUse(shader_t *shader) {
|
||||
}
|
||||
|
||||
void shaderUseCamera(shader_t *shader, camera_t *camera) {
|
||||
glUniformMatrix4fv(shader->uniView, 1, GL_FALSE, (float*)camera->view);
|
||||
glUniformMatrix4fv(shader->uniProj, 1, GL_FALSE, (float*)camera->projection);
|
||||
glUniformMatrix4fv(shader->uniView, 1, GL_FALSE, camera->view[0]);
|
||||
glUniformMatrix4fv(shader->uniProj, 1, GL_FALSE, camera->projection[0]);
|
||||
}
|
||||
|
||||
void shaderUseTexture(shader_t *shader, texture_t *texture) {
|
||||
@ -131,11 +131,13 @@ void shaderUsePosition(shader_t *shader,
|
||||
//Rotation, we do each axis individually
|
||||
axis[0] = 1, axis[1] = 0, axis[2] = 0;
|
||||
glm_rotate(MATRIX_POSITION, pitch, axis);
|
||||
|
||||
axis[0] = 0, axis[1] = 1;
|
||||
glm_rotate(MATRIX_POSITION, yaw, axis);
|
||||
|
||||
axis[1] = 0, axis[2] = 1;
|
||||
glm_rotate(MATRIX_POSITION, roll, axis);
|
||||
|
||||
//Send to the shader.
|
||||
glUniformMatrix4fv(shader->uniModl, 1, GL_FALSE, (float*)MATRIX_POSITION);
|
||||
glUniformMatrix4fv(shader->uniModl, 1, GL_FALSE, MATRIX_POSITION[0]);
|
||||
}
|
Reference in New Issue
Block a user