Compile without OpenGL.
Since a GLuint returning virtual was added to QPlatformOpenGLContext we need to make sure it's protected by #ifndef QT_NO_OPENGL. Change-Id: Id2f56ccdccc3863986250ee1b3aa7efccf88ba5c Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
This commit is contained in:
parent
bc8a2de9d4
commit
3aacbc1e2b
@ -220,12 +220,14 @@ QPlatformPixmap *QPlatformIntegration::createPlatformPixmap(QPlatformPixmap::Pix
|
|||||||
return new QRasterPlatformPixmap(type);
|
return new QRasterPlatformPixmap(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
QPlatformOpenGLContext *QPlatformIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
|
QPlatformOpenGLContext *QPlatformIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(context);
|
Q_UNUSED(context);
|
||||||
qWarning("This plugin does not support createPlatformOpenGLContext!");
|
qWarning("This plugin does not support createPlatformOpenGLContext!");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Factory function for QPlatformSharedGraphicsCache. This function will return 0 if the platform
|
Factory function for QPlatformSharedGraphicsCache. This function will return 0 if the platform
|
||||||
|
@ -87,7 +87,9 @@ public:
|
|||||||
virtual QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const;
|
virtual QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const;
|
||||||
virtual QPlatformWindow *createPlatformWindow(QWindow *window) const = 0;
|
virtual QPlatformWindow *createPlatformWindow(QWindow *window) const = 0;
|
||||||
virtual QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const = 0;
|
virtual QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const = 0;
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
virtual QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const;
|
virtual QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const;
|
||||||
|
#endif
|
||||||
virtual QPlatformSharedGraphicsCache *createPlatformSharedGraphicsCache(const char *cacheId) const;
|
virtual QPlatformSharedGraphicsCache *createPlatformSharedGraphicsCache(const char *cacheId) const;
|
||||||
|
|
||||||
// Event dispatcher:
|
// Event dispatcher:
|
||||||
|
@ -171,6 +171,7 @@ private:
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
|
QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
|
||||||
{
|
{
|
||||||
QXcbScreen *screen = static_cast<QXcbScreen *>(context->screen()->handle());
|
QXcbScreen *screen = static_cast<QXcbScreen *>(context->screen()->handle());
|
||||||
@ -185,6 +186,7 @@ QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLCont
|
|||||||
qWarning("Cannot create platform GL context, none of GLX, EGL, DRI2 is enabled");
|
qWarning("Cannot create platform GL context, none of GLX, EGL, DRI2 is enabled");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QPlatformBackingStore *QXcbIntegration::createPlatformBackingStore(QWindow *window) const
|
QPlatformBackingStore *QXcbIntegration::createPlatformBackingStore(QWindow *window) const
|
||||||
{
|
{
|
||||||
|
@ -58,7 +58,9 @@ public:
|
|||||||
~QXcbIntegration();
|
~QXcbIntegration();
|
||||||
|
|
||||||
QPlatformWindow *createPlatformWindow(QWindow *window) const;
|
QPlatformWindow *createPlatformWindow(QWindow *window) const;
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const;
|
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const;
|
||||||
|
#endif
|
||||||
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const;
|
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const;
|
||||||
|
|
||||||
bool hasCapability(Capability cap) const;
|
bool hasCapability(Capability cap) const;
|
||||||
|
@ -78,7 +78,7 @@ contains(DEFINES, XCB_USE_DRI2) {
|
|||||||
HEADERS += qdri2context.h
|
HEADERS += qdri2context.h
|
||||||
SOURCES += qdri2context.cpp
|
SOURCES += qdri2context.cpp
|
||||||
|
|
||||||
} else {
|
} else:contains(QT_CONFIG, opengl) {
|
||||||
contains(QT_CONFIG, opengles2) {
|
contains(QT_CONFIG, opengles2) {
|
||||||
DEFINES += XCB_USE_EGL
|
DEFINES += XCB_USE_EGL
|
||||||
LIBS += -lEGL
|
LIBS += -lEGL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user