-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEGLAPIAccessors.hpp
37 lines (25 loc) · 908 Bytes
/
EGLAPIAccessors.hpp
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
#ifndef EGLAPIACCESSORS_HPP
#define EGLAPIACCESSORS_HPP
#include <EGL/egl.h>
#include <EGL/eglext.h>
#if !defined EGL_KHR_stream || !defined EGL_KHR_stream_fifo || !defined EGL_KHR_stream_consumer_gltexture
# error "EGL_KHR_stream extensions are not supported!"
#endif
class EGLDisplayAccessor
{
public:
static EGLDisplay getInstance();
private:
EGLDisplayAccessor();
~EGLDisplayAccessor();
EGLDisplay eglDisplay;
};
#define EXTENSION_LIST_MY(T) \
T( PFNEGLCREATESTREAMKHRPROC, eglCreateStreamKHR ) \
T( PFNEGLDESTROYSTREAMKHRPROC, eglDestroyStreamKHR ) \
T( PFNEGLQUERYSTREAMKHRPROC, eglQueryStreamKHR ) \
T( PFNEGLSTREAMATTRIBKHRPROC, eglStreamAttribKHR )
#define EXTLST_EXTERN(tx, x) extern tx x;
EXTENSION_LIST_MY(EXTLST_EXTERN)
bool setupEGLExtensions();
#endif // EGLAPIACCESSORS_HPP