src/camera.c

changeset 99
ac143db979dc
parent 47
44457f6cb0a2
equal deleted inserted replaced
98:83bec26453a8 99:ac143db979dc
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 }

mercurial