MythTV master
mythegl.h
Go to the documentation of this file.
1#ifndef MYTHEGL_H
2#define MYTHEGL_H
3
4// Qt
5#include <QOpenGLContext>
6
7// MythTV
8#include "libmythbase/mythconfig.h"
10
11using MYTH_EGLIMAGETARGET = void (*)(GLenum, void*);
12using MYTH_EGLCREATEIMAGE = void* (*)(void*, void*, unsigned int, void*, const int32_t *);
13using MYTH_EGLDESTROYIMAGE = void (*)(void*, void*);
14#ifdef Q_OS_DARWIN
15using MYTH_EGLGETPLATFORMDISPLAY = void* (*)(GLenum, int, const intptr_t*);
16#else
17using MYTH_EGLGETPLATFORMDISPLAY = void* (*)(GLenum, void*, const intptr_t*);
18#endif
19
21
23{
24 public:
25 explicit MythEGL(MythRenderOpenGL *Context);
26 ~MythEGL() = default;
27
28 bool IsEGL(void);
29 bool HasEGLExtension(const QString& Extension);
30 void* GetEGLDisplay(void);
31 static qint32 GetEGLError(void);
32 void eglImageTargetTexture2DOES (GLenum Target, void* Image);
33 void* eglCreateImageKHR (void* Disp, void* Context, unsigned int Target,
34 void* Buffer, const int32_t *Attributes);
35 void eglDestroyImageKHR (void* Disp, void* Image);
36 static QString GetEGLVendor(void);
37
38 private:
39 Q_DISABLE_COPY(MythEGL)
40 bool InitEGL(void);
41
42#if CONFIG_EGL
43 MythRenderOpenGL *m_context { nullptr };
44#endif
45 void* m_eglDisplay { nullptr };
46 MYTH_EGLIMAGETARGET m_eglImageTargetTexture2DOES { nullptr };
47 MYTH_EGLCREATEIMAGE m_eglCreateImageKHR { nullptr };
48 MYTH_EGLDESTROYIMAGE m_eglDestroyImageKHR { nullptr };
49};
50
51#endif // MYTHEGL_H
~MythEGL()=default
void(*)(GLenum, void *) MYTH_EGLIMAGETARGET
Definition: mythegl.h:11
void(*)(void *, void *) MYTH_EGLDESTROYIMAGE
Definition: mythegl.h:13
void *(*)(void *, void *, unsigned int, void *, const int32_t *) MYTH_EGLCREATEIMAGE
Definition: mythegl.h:12
void *(*)(GLenum, void *, const intptr_t *) MYTH_EGLGETPLATFORMDISPLAY
Definition: mythegl.h:17
#define MUI_PUBLIC
Definition: mythuiexp.h:9