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