in_sdl: give names to gamepad buttons
[libpicofe.git] / gl.h
... / ...
CommitLineData
1#ifndef LIBPICOFE_GL_H
2#define LIBPICOFE_GL_H
3
4#ifdef HAVE_GLES
5
6int gl_init(void *display, int *quirks);
7int gl_create(void *window, int *quirks, int w, int h);
8void gl_announce(void);
9int gl_flip_v(const void *fb, int w, int h, const float *vertices);
10int gl_flip(const void *fb, int w, int h);
11void gl_clear(void);
12void gl_destroy(void);
13void gl_shutdown(void);
14
15/* for external flips */
16extern void *gl_es_display;
17extern void *gl_es_surface;
18
19#else
20
21static __inline int gl_init(void *display, int *quirks)
22{
23 return -1;
24}
25
26static __inline int gl_create(void *window, int *quirks, int w, int h)
27{
28 return -1;
29}
30static __inline void gl_announce(void)
31{
32}
33static __inline int gl_flip_v(const void *fb, int w, int h, const float *vertices)
34{
35 return -1;
36}
37static __inline int gl_flip(const void *fb, int w, int h)
38{
39 return -1;
40}
41static __inline void gl_clear(void) {}
42static __inline void gl_destroy(void) {}
43static __inline void gl_shutdown(void) {}
44
45#define gl_es_display (void *)0
46#define gl_es_surface (void *)0
47
48#endif
49
50#define GL_QUIRK_ACTIVATE_RECREATE 1
51#define GL_QUIRK_SCALING_NEAREST 2
52#define GL_QUIRK_VSYNC_ON 4
53
54#endif // LIBPICOFE_GL_H