diff options
| author | Aldrik Ramaekers <aldrik.ramaekers@protonmail.com> | 2020-02-05 18:58:55 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik.ramaekers@protonmail.com> | 2020-02-05 18:58:55 +0100 |
| commit | 8c2f35bd1f18b62fff609f3a7d77d4e85b706916 (patch) | |
| tree | 93e504989bd6182b1b381f1c9bd1b46e0732169a /src/camera.c | |
| parent | ec901c42d7d5dee13b4c69e4b65fc385d8ffd3a8 (diff) | |
refactor
Diffstat (limited to 'src/camera.c')
| -rw-r--r-- | src/camera.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/camera.c b/src/camera.c deleted file mode 100644 index 5bde9f9..0000000 --- a/src/camera.c +++ /dev/null @@ -1,22 +0,0 @@ -/* -* BSD 2-Clause “Simplified” License -* Copyright (c) 2019, Aldrik Ramaekers, aldrik.ramaekers@protonmail.com -* All rights reserved. -*/ - -void camera_apply_transformations(platform_window *window, camera *camera) -{ - s32 x = (window->width/2)+(camera->x); - s32 y = (window->height/2)+(camera->y); - glTranslatef(x, y, 0.0f); - glRotatef(camera->rotation, 0.0f, 0.0f, 1.0f); - glTranslatef(-x, -y, 0.0f); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - glOrtho(camera->x, window->width+camera->x, - window->height+camera->y, camera->y, -100, 100); - - glMatrixMode(GL_MODELVIEW); -}
\ No newline at end of file |
