sgl

view include/sgl.h @ 5:0570e27e5ebc

pretty much done with the basic functionality and GLX shit
author John Tsiombikas <nuclear@siggraph.org>
date Fri, 13 May 2011 07:49:47 +0300
parents 648f8604d2b2
children 0cb438c86b98
line source
1 #ifndef SGL_H_
2 #define SGL_H_
4 #define SGL_DOUBLE 1
5 #define SGL_DEPTH 2
6 #define SGL_STENCIL 4
7 #define SGL_STEREO 8
8 #define SGL_MULTISAMPLE 16
10 enum {
11 SGL_CREATE,
12 SGL_CLOSE,
13 SGL_DISPLAY,
14 SGL_RESHAPE,
15 SGL_KEYBOARD,
16 SGL_MOUSE,
17 SGL_MOTION,
18 SGL_PASSIVE,
19 SGL_IDLE,
21 SGL_NUM_CALLBACKS
22 };
24 enum {
25 SGL_LEFT_BUTTON,
26 SGL_MIDDLE_BUTTON,
27 SGL_RIGHT_BUTTON
28 };
30 int sgl_init(void);
31 void sgl_quit(void);
33 int sgl_set_video_mode(int xsz, int ysz);
34 int sgl_get_video_mode(int *xsz, int *ysz);
36 int sgl_create_window(int xsz, int ysz, unsigned int mode);
37 void sgl_close_window(int win);
39 int sgl_set_active(int id);
40 int sgl_set_title(const char *str);
42 void sgl_redisplay(void);
43 void sgl_swap_buffers(void);
45 int sgl_process_events(void);
46 void sgl_event_loop(void);
48 int sgl_push_callbacks(void);
49 int sgl_pop_callbacks(void);
50 void sgl_clear_callbacks(void);
51 void sgl_set_callback(int idx, void (*func)());
52 void (*sgl_get_callback(int idx))();
54 #endif /* SGL_H_ */