QT_BEGIN_NAMESPACE
-#if defined(Q_WS_WIN)
-extern Q_GUI_EXPORT bool qt_cleartype_enabled;
-#endif
-#ifdef Q_WS_MAC
-extern bool qt_applefontsmoothing_enabled;
-#endif
Q_GUI_EXPORT QImage qt_imageForBrush(int brushStyle, bool invert);
}
-#if defined(Q_WS_WIN)
-static bool fontSmoothingApproximately(qreal target)
-{
- extern Q_GUI_EXPORT qreal qt_fontsmoothing_gamma; // qapplication_win.cpp
- return (qAbs(qt_fontsmoothing_gamma - target) < 0.2);
-}
-#endif
// #define QT_OPENGL_DRAWCACHEDGLYPHS_INDEX_ARRAY_VBO
}
bool srgbFrameBufferEnabled = false;
- if (ctx->d_ptr->extension_flags & QGLExtensions::SRGBFrameBuffer) {
-#if defined(Q_WS_MAC)
- if (glyphType == QFontEngineGlyphCache::Raster_RGBMask)
-#elif defined(Q_WS_WIN)
- if (glyphType != QFontEngineGlyphCache::Raster_RGBMask || fontSmoothingApproximately(2.1))
-#else
- if (false)
-#endif
- {
- glEnable(FRAMEBUFFER_SRGB_EXT);
- srgbFrameBufferEnabled = true;
- }
- }
#if defined(QT_OPENGL_DRAWCACHEDGLYPHS_INDEX_ARRAY_VBO)
glDrawElements(GL_TRIANGLE_STRIP, 6 * numGlyphs, GL_UNSIGNED_SHORT, 0);
d->glyphCacheType = QFontEngineGlyphCache::Raster_A8;
#if !defined(QT_OPENGL_ES_2)
-#if defined(Q_WS_WIN)
- if (qt_cleartype_enabled
- && (fontSmoothingApproximately(1.0) || fontSmoothingApproximately(2.1)))
-#endif
-#if defined(Q_WS_MAC)
- if (qt_applefontsmoothing_enabled)
-#endif
d->glyphCacheType = QFontEngineGlyphCache::Raster_RGBMask;
#endif
QT_BEGIN_NAMESPACE
-#ifdef Q_WS_WIN
-extern Q_GUI_EXPORT bool qt_cleartype_enabled;
-#endif
QBasicAtomicInt qgltextureglyphcache_serial_number = Q_BASIC_ATOMIC_INITIALIZER(1);
QT_MODULE(OpenGL)
-#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
-class QGLCmap;
-#endif
class QPixmap;
class QGLWidgetPrivate;
friend class QGLExtensions;
friend class QGLTexture;
friend QGLFormat::OpenGLVersionFlags QGLFormat::openGLVersionFlags();
-#ifdef Q_WS_MAC
-public:
- void updatePaintDevice();
-private:
- friend class QMacGLWindowChangeEvent;
- friend QGLContextPrivate *qt_phonon_get_dptr(const QGLContext *);
-#endif
friend class QGLFramebufferObject;
friend class QGLFramebufferObjectPrivate;
friend class QGLFBOGLPaintDevice;
private:
Q_DISABLE_COPY(QGLWidget)
-#ifdef Q_WS_MAC
- friend class QMacGLWindowChangeEvent;
-#endif
friend class QGLDrawable;
friend class QGLPixelBuffer;
friend class QGLPixelBufferPrivate;
class QGLContext;
class QGLOverlayWidget;
class QPixmap;
-#ifdef Q_WS_MAC
-# ifdef qDebug
-# define old_qDebug qDebug
-# undef qDebug
-# endif
-QT_BEGIN_INCLUDE_NAMESPACE
-QT_END_INCLUDE_NAMESPACE
-# ifdef old_qDebug
-# undef qDebug
-# define qDebug QT_NO_QDEBUG_MACRO
-# undef old_qDebug
-# endif
-class QMacWindowChangeEvent;
-#endif
QT_BEGIN_INCLUDE_NAMESPACE
#include <QtOpenGL/private/qglextensions_p.h>
//
// extension prototypes
-#ifndef Q_WS_MAC
# ifndef APIENTRYP
# ifdef APIENTRY
# define APIENTRYP APIENTRY *
# define APIENTRYP *
# endif
# endif
-#else
-# define APIENTRY
-# define APIENTRYP *
-#endif
#include <QtCore/qglobal.h>
typedef ptrdiff_t qgl_GLintptr;
typedef ptrdiff_t qgl_GLsizeiptr;
-#ifdef Q_WS_WIN
-# define QGLF_APIENTRY APIENTRY
-#endif
-#ifndef Q_WS_MAC
# ifndef QGLF_APIENTRYP
# ifdef QGLF_APIENTRY
# define QGLF_APIENTRYP QGLF_APIENTRY *
# define QGLF_APIENTRYP *
# endif
# endif
-#else
-# define QGLF_APIENTRY
-# define QGLF_APIENTRYP *
-#endif
struct QGLFunctionsPrivate;