diff options
Diffstat (limited to 'src/plugins/platforms/minimalegl/qminimaleglscreen.cpp')
-rw-r--r-- | src/plugins/platforms/minimalegl/qminimaleglscreen.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/plugins/platforms/minimalegl/qminimaleglscreen.cpp b/src/plugins/platforms/minimalegl/qminimaleglscreen.cpp index d3d091fab7..0175d2dbdd 100644 --- a/src/plugins/platforms/minimalegl/qminimaleglscreen.cpp +++ b/src/plugins/platforms/minimalegl/qminimaleglscreen.cpp @@ -41,7 +41,9 @@ #include "qminimaleglwindow.h" #include <QtEglSupport/private/qeglconvenience_p.h> -#include <QtEglSupport/private/qeglplatformcontext_p.h> +#ifndef QT_NO_OPENGL +# include <QtEglSupport/private/qeglplatformcontext_p.h> +#endif #ifdef Q_OPENKODE #include <KD/kd.h> @@ -52,6 +54,8 @@ QT_BEGIN_NAMESPACE // #define QEGL_EXTRA_DEBUG +#ifndef QT_NO_OPENGL + class QMinimalEglContext : public QEGLPlatformContext { public: @@ -68,6 +72,8 @@ public: } }; +#endif + QMinimalEglScreen::QMinimalEglScreen(EGLNativeDisplayType display) : m_depth(32) , m_format(QImage::Format_Invalid) @@ -161,9 +167,10 @@ void QMinimalEglScreen::createAndSetPlatformContext() } // qWarning("Created surface %dx%d\n", w, h); +#ifndef QT_NO_OPENGL QEGLPlatformContext *platformContext = new QMinimalEglContext(platformFormat, 0, m_dpy); m_platformContext = platformContext; - +#endif EGLint w,h; // screen size detection eglQuerySurface(m_dpy, m_surface, EGL_WIDTH, &w); eglQuerySurface(m_dpy, m_surface, EGL_HEIGHT, &h); @@ -191,6 +198,7 @@ QImage::Format QMinimalEglScreen::format() const createAndSetPlatformContext(); return m_format; } +#ifndef QT_NO_OPENGL QPlatformOpenGLContext *QMinimalEglScreen::platformContext() const { if (!m_platformContext) { @@ -199,5 +207,5 @@ QPlatformOpenGLContext *QMinimalEglScreen::platformContext() const } return m_platformContext; } - +#endif QT_END_NAMESPACE |