| 33 float right = left + (float) rect.size.width; |
33 float right = left + (float) rect.size.width; |
| 34 float top = (float) rect.pos.y; |
34 float top = (float) rect.pos.y; |
| 35 float bottom = top + (float) rect.size.height; |
35 float bottom = top + (float) rect.size.height; |
| 36 asc_mat4f_ortho(camera->projection, left, right, bottom, top, -1, 1); |
36 asc_mat4f_ortho(camera->projection, left, right, bottom, top, -1, 1); |
| 37 } |
37 } |
| |
38 |
| |
39 void asc_camera_ortho_update_size(AscCamera *camera, asc_vec2i size) { |
| |
40 asc_mat4f_ortho_update_size(camera->projection, (float)size.width, (float)size.height); |
| |
41 } |