Support dynamic opengl32 - ANGLE switching on Windows

Change-Id: I38532db3ab0ad4fcb8dbabd0cbb528f7d8e4ba06
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
Laszlo Agocs
2014-02-05 15:54:36 +01:00
parent 49cde1b2c4
commit 66ba21971b
13 changed files with 330 additions and 110 deletions

View File

@@ -70,6 +70,31 @@ QT_BEGIN_NAMESPACE
class QAbstractVideoSurface;
class QOpenGLContext;
class EGLWrapper
{
public:
EGLWrapper();
__eglMustCastToProperFunctionPointerType getProcAddress(const char *procname);
EGLSurface createPbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
EGLBoolean destroySurface(EGLDisplay dpy, EGLSurface surface);
EGLBoolean bindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
EGLBoolean releaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
private:
typedef __eglMustCastToProperFunctionPointerType (EGLAPIENTRYP EglGetProcAddress)(const char *procname);
typedef EGLSurface (EGLAPIENTRYP EglCreatePbufferSurface)(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
typedef EGLBoolean (EGLAPIENTRYP EglDestroySurface)(EGLDisplay dpy, EGLSurface surface);
typedef EGLBoolean (EGLAPIENTRYP EglBindTexImage)(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
typedef EGLBoolean (EGLAPIENTRYP EglReleaseTexImage)(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
EglGetProcAddress m_eglGetProcAddress;
EglCreatePbufferSurface m_eglCreatePbufferSurface;
EglDestroySurface m_eglDestroySurface;
EglBindTexImage m_eglBindTexImage;
EglReleaseTexImage m_eglReleaseTexImage;
};
class D3DPresentEngine : public QObject
{
Q_OBJECT
@@ -123,6 +148,7 @@ private:
EGLSurface m_eglSurface;
unsigned int m_glTexture;
IDirect3DTexture9 *m_texture;
EGLWrapper *m_egl;
};
QT_END_NAMESPACE