initial commit
[vktest3] / src / app.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include "app.h"
4 #include "vk.h"
5
6 int app_init(void)
7 {
8         unsigned int flags;
9
10         if(vk_init(VKINIT_DEPTH, &flags) == -1) {
11                 return -1;
12         }
13         return 0;
14 }
15
16 void app_cleanup(void)
17 {
18         vk_cleanup();
19 }
20
21
22 void app_display(void)
23 {
24 }
25
26 void app_reshape(int x, int y)
27 {
28         if(vk_reshape(x, y) == -1) {
29                 abort();
30         }
31 }
32
33 void app_keyboard(int key, int press)
34 {
35         if(!press) return;
36
37         switch(key) {
38         case 27:
39                 app_quit();
40                 break;
41         }
42 }
43
44 void app_mouse(int bn, int press, int x, int y)
45 {
46 }
47
48 void app_motion(int x, int y)
49 {
50 }