From 6a7b7947e36a2d9440c4eba40dc6d4177fbc0c29 Mon Sep 17 00:00:00 2001 From: ninerider Date: Sat, 27 Feb 2010 12:13:01 +0100 Subject: Preparation to enable OpenGLES 2.0 for Windows Mobile. As there are no SDKs available for our test device (HTC HD2) that support OpenGL, we had to construct the libraries by extracting them from the ROM image. This is still work in progress at this time. --- src/gui/egl/qegl_wince.cpp | 6 ++++-- src/gui/egl/qeglproperties_p.h | 9 +++++++-- src/opengl/qgl_p.h | 12 +++++++++--- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/gui/egl/qegl_wince.cpp b/src/gui/egl/qegl_wince.cpp index c9c9773..dfef39f 100644 --- a/src/gui/egl/qegl_wince.cpp +++ b/src/gui/egl/qegl_wince.cpp @@ -89,8 +89,10 @@ EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties EGLNativeDisplayType QEglContext::nativeDisplay() { - HWND win = (static_cast(device))->winId(); - HDC myDc = GetDC(win); + //HWND win = (static_cast(device))->winId(); + //HDC myDc = GetDC(win); + HDC myDc = GetWindowDC(0); + if (!myDc) { qWarning("QEglContext::nativeDisplay(): WinCE display is not open"); return EGL_DEFAULT_DISPLAY; diff --git a/src/gui/egl/qeglproperties_p.h b/src/gui/egl/qeglproperties_p.h index feed1d2..43c3393 100644 --- a/src/gui/egl/qeglproperties_p.h +++ b/src/gui/egl/qeglproperties_p.h @@ -58,12 +58,17 @@ QT_BEGIN_INCLUDE_NAMESPACE +#if defined(QT_OPENGL_ES_2) +# include +#endif + #if defined(QT_GLES_EGL) -#include +# include #else -#include +# include #endif + #if defined(Q_WS_X11) // If included , then the global namespace // may have been polluted with X #define's. The following makes sure diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 0d5a54a..80217c0 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -80,13 +80,19 @@ #define q_vertexTypeEnum GL_FIXED #endif //QT_OPENGL_ES_1_CL -#ifdef QT_OPENGL_ES +#if defined(QT_OPENGL_ES) || defined(QT_OPENGL_ES_2) QT_BEGIN_INCLUDE_NAMESPACE + #if defined(QT_OPENGL_ES_2) -#include +# include +#endif + +#if defined(QT_GLES_EGL) +# include #else -#include +# include #endif + QT_END_INCLUDE_NAMESPACE #endif -- cgit v0.12