-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathgl.h
More file actions
54 lines (44 loc) · 1.13 KB
/
gl.h
File metadata and controls
54 lines (44 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef LIBPICOFE_GL_H
#define LIBPICOFE_GL_H
#ifdef HAVE_GLES
int gl_init(void *display, int *quirks);
int gl_create(void *window, int *quirks, int w, int h);
void gl_announce(void);
int gl_flip_v(const void *fb, int w, int h, const float *vertices);
int gl_flip(const void *fb, int w, int h);
void gl_clear(void);
void gl_destroy(void);
void gl_shutdown(void);
/* for external flips */
extern void *gl_es_display;
extern void *gl_es_surface;
#else
static __inline int gl_init(void *display, int *quirks)
{
return -1;
}
static __inline int gl_create(void *window, int *quirks, int w, int h)
{
return -1;
}
static __inline void gl_announce(void)
{
}
static __inline int gl_flip_v(const void *fb, int w, int h, const float *vertices)
{
return -1;
}
static __inline int gl_flip(const void *fb, int w, int h)
{
return -1;
}
static __inline void gl_clear(void) {}
static __inline void gl_destroy(void) {}
static __inline void gl_shutdown(void) {}
#define gl_es_display (void *)0
#define gl_es_surface (void *)0
#endif
#define GL_QUIRK_ACTIVATE_RECREATE 1
#define GL_QUIRK_SCALING_NEAREST 2
#define GL_QUIRK_VSYNC_ON 4
#endif // LIBPICOFE_GL_H