1669 return glXBindTexImageEXT && glXReleaseTexImageEXT; |
1669 return glXBindTexImageEXT && glXReleaseTexImageEXT; |
1670 } |
1670 } |
1671 #endif //defined(GLX_VERSION_1_3) && !defined(Q_OS_HPUX) |
1671 #endif //defined(GLX_VERSION_1_3) && !defined(Q_OS_HPUX) |
1672 |
1672 |
1673 |
1673 |
1674 QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData *pmd, const qint64 key, |
1674 QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, const qint64 key, |
1675 QGLContext::BindOptions options) |
1675 QGLContext::BindOptions options) |
1676 { |
1676 { |
1677 #if !defined(GLX_VERSION_1_3) || defined(Q_OS_HPUX) |
1677 #if !defined(GLX_VERSION_1_3) || defined(Q_OS_HPUX) |
1678 return 0; |
1678 return 0; |
1679 #else |
1679 #else |
|
1680 |
|
1681 // Check we have GLX 1.3, as it is needed for glXCreatePixmap & glXDestroyPixmap |
|
1682 int majorVersion = 0; |
|
1683 int minorVersion = 0; |
|
1684 glXQueryVersion(X11->display, &majorVersion, &minorVersion); |
|
1685 if (majorVersion < 1 || (majorVersion == 1 && minorVersion < 3)) |
|
1686 return 0; |
|
1687 |
1680 Q_Q(QGLContext); |
1688 Q_Q(QGLContext); |
1681 |
1689 |
1682 Q_ASSERT(pmd->classId() == QPixmapData::X11Class); |
1690 QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pixmap->data_ptr().data()); |
|
1691 Q_ASSERT(pixmapData->classId() == QPixmapData::X11Class); |
1683 |
1692 |
1684 if (!qt_resolveTextureFromPixmap(paintDevice)) |
1693 if (!qt_resolveTextureFromPixmap(paintDevice)) |
1685 return 0; |
1694 return 0; |
1686 |
1695 |
1687 QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pmd); |
|
1688 const QX11Info &x11Info = pixmapData->xinfo; |
1696 const QX11Info &x11Info = pixmapData->xinfo; |
1689 |
1697 |
1690 // Store the configs (Can be static because configs aren't dependent on current context) |
1698 // Store the configs (Can be static because configs aren't dependent on current context) |
1691 static GLXFBConfig glxRGBPixmapConfig = 0; |
1699 static GLXFBConfig glxRGBPixmapConfig = 0; |
1692 static bool RGBConfigInverted = false; |
1700 static bool RGBConfigInverted = false; |