include(../../qpluginbase.pri)
QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/platforms
-QT += opengl opengl-private platformsupport platformsupport-private widgets-private
+QT += platformsupport platformsupport-private widgets-private
+
+contains(QT_CONFIG, opengles2) {
+ QT += opengl opengl-private
+}
# Uncomment this to build with support for IMF once it becomes available in the BBNDK
#CONFIG += qqnx_imf
SOURCES = main.cpp \
qqnxbuffer.cpp \
qqnxeventthread.cpp \
- qqnxglcontext.cpp \
- qqnxglbackingstore.cpp \
qqnxintegration.cpp \
qqnxscreen.cpp \
qqnxwindow.cpp \
qqnxabstractvirtualkeyboard.cpp
}
+contains(QT_CONFIG, opengles2) {
+ SOURCES += qqnxglcontext.cpp \
+ qqnxglbackingstore.cpp
+}
+
HEADERS = main.h \
qqnxbuffer.h \
qqnxeventthread.h \
qqnxkeytranslator.h \
qqnxintegration.h \
- qqnxglcontext.h \
- qqnxglbackingstore.h \
qqnxscreen.h \
qqnxwindow.h \
qqnxrasterbackingstore.h \
qqnxabstractvirtualkeyboard.h
}
+contains(QT_CONFIG, opengles2) {
+ HEADERS += qqnxglcontext.h \
+ qqnxglbackingstore.h
+}
+
CONFIG(blackberry) {
SOURCES += qqnxservices.cpp
QMAKE_CXXFLAGS += -I./private
-LIBS += -lscreen -lEGL
+LIBS += -lscreen
+
+contains(QT_CONFIG, opengles2) {
+ LIBS += -lEGL
+}
CONFIG(blackberry) {
LIBS += -lbps -lpps -lclipboard
#include "qqnxintegration.h"
#include "qqnxeventthread.h"
-#include "qqnxglbackingstore.h"
-#include "qqnxglcontext.h"
#include "qqnxnativeinterface.h"
#include "qqnxrasterbackingstore.h"
#include "qqnxscreen.h"
#include "qqnxscreeneventhandler.h"
#include "qqnxwindow.h"
-#include "qqnxglcontext.h"
#ifdef Q_OS_BLACKBERRY
#include "qqnxnavigatoreventhandler.h"
#include <QtGui/QPlatformWindow>
#include <QtGui/QWindowSystemInterface>
+
+#ifndef QT_NO_OPENGL
+#include "qqnxglbackingstore.h"
+#include "qqnxglcontext.h"
+
#include <QtGui/QOpenGLContext>
+#endif
#include <QtCore/QDebug>
#include <QtCore/QHash>
, m_services(0)
#endif
, m_fontDatabase(new QGenericUnixFontDatabase())
+#ifndef QT_NO_OPENGL
, m_paintUsingOpenGL(false)
+#endif
, m_eventDispatcher(createUnixEventDispatcher())
, m_nativeInterface(new QQnxNativeInterface())
, m_screenEventHandler(new QQnxScreenEventHandler())
// Create displays for all possible screens (which may not be attached)
createDisplays();
+#ifndef QT_NO_OPENGL
// Initialize global OpenGL resources
QQnxGLContext::initialize();
+#endif
// Create/start event thread
m_eventThread = new QQnxEventThread(m_screenContext, m_screenEventHandler);
// Close connection to QNX composition manager
screen_destroy_context(m_screenContext);
+#ifndef QT_NO_OPENGL
// Cleanup global OpenGL resources
QQnxGLContext::shutdown();
+#endif
// Destroy services class
#ifdef Q_OS_BLACKBERRY
#if defined(QQNXINTEGRATION_DEBUG)
qDebug() << Q_FUNC_INFO;
#endif
+#ifndef QT_NO_OPENGL
if (paintUsingOpenGL())
return new QQnxGLBackingStore(window);
else
+#endif
return new QQnxRasterBackingStore(window);
}
+#ifndef QT_NO_OPENGL
QPlatformOpenGLContext *QQnxIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
{
#if defined(QQNXINTEGRATION_DEBUG)
#endif
return new QQnxGLContext(context);
}
+#endif
#ifdef Q_OS_BLACKBERRY
QPlatformInputContext *QQnxIntegration::inputContext() const
QPlatformWindow *createPlatformWindow(QWindow *window) const;
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const;
+
+#ifndef QT_NO_OPENGL
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const;
+#endif
#ifdef Q_OS_BLACKBERRY
QPlatformInputContext *inputContext() const;
QVariant styleHint(StyleHint hint) const;
+#ifndef QT_NO_OPENGL
bool paintUsingOpenGL() const { return m_paintUsingOpenGL; }
+#endif
#ifdef Q_OS_BLACKBERRY
QPlatformServices *services() const;
QQnxServices *m_services;
#endif
QPlatformFontDatabase *m_fontDatabase;
+#ifndef QT_NO_OPENGL
bool m_paintUsingOpenGL;
+#endif
QAbstractEventDispatcher *m_eventDispatcher;
QQnxNativeInterface *m_nativeInterface;
QList<QQnxScreen*> m_screens;
****************************************************************************/
#include "qqnxwindow.h"
+#ifndef QT_NO_OPENGL
#include "qqnxglcontext.h"
+#endif
#include "qqnxintegration.h"
#include "qqnxscreen.h"
m_window(0),
m_currentBufferIndex(-1),
m_previousBufferIndex(-1),
+#ifndef QT_NO_OPENGL
m_platformOpenGLContext(0),
+#endif
m_screen(0),
m_parentWindow(0),
m_visible(true)
// Create window buffers if they do not exist
if (!hasBuffers()) {
+#ifndef QT_NO_OPENGL
// Get pixel format from EGL config if using OpenGL;
// otherwise inherit pixel format of window's screen
if (m_platformOpenGLContext != 0) {
} else {
val[0] = m_screen->nativeFormat();
}
+#endif
errno = 0;
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_FORMAT, val);
QWindowSystemInterface::handleWindowActivated(window());
}
+#ifndef QT_NO_OPENGL
void QQnxWindow::setPlatformOpenGLContext(QQnxGLContext *platformOpenGLContext)
{
// This function does not take ownership of the platform gl context.
// It is owned by the frontend QOpenGLContext
m_platformOpenGLContext = platformOpenGLContext;
}
+#endif
QQnxWindow *QQnxWindow::findWindow(screen_window_t windowHandle)
{
#include <QtGui/QImage>
+#ifndef QT_NO_OPENGL
#include <EGL/egl.h>
+#endif
#include <screen/screen.h>
// all surfaces double buffered
#define MAX_BUFFER_COUNT 2
+#ifndef QT_NO_OPENGL
class QQnxGLContext;
+#endif
class QQnxScreen;
class QSurfaceFormat;
QQnxScreen *screen() const { return m_screen; }
const QList<QQnxWindow*>& children() const { return m_childWindows; }
+#ifndef QT_NO_OPENGL
void setPlatformOpenGLContext(QQnxGLContext *platformOpenGLContext);
QQnxGLContext *platformOpenGLContext() const { return m_platformOpenGLContext; }
+#endif
QQnxWindow *findWindow(screen_window_t windowHandle);
QRegion m_previousDirty;
QRegion m_scrolled;
+#ifndef QT_NO_OPENGL
QQnxGLContext *m_platformOpenGLContext;
+#endif
QQnxScreen *m_screen;
QList<QQnxWindow*> m_childWindows;
QQnxWindow *m_parentWindow;