bool QGLPixmapData::useFramebufferObjects() const { return QGLFramebufferObject::hasOpenGLFramebufferObjects() && QGLFramebufferObject::hasOpenGLFramebufferBlit() && qt_gl_preferGL2Engine() && (w * h > 32*32); // avoid overhead of FBOs for small pixmaps }
/*! \reimp */ QPaintEngine *QGLFramebufferObject::paintEngine() const { Q_D(const QGLFramebufferObject); if (d->engine) return d->engine; #if !defined(QT_OPENGL_ES_1) #if !defined (QT_OPENGL_ES_2) if (qt_gl_preferGL2Engine()) { #endif QPaintEngine *engine = qt_buffer_2_engine(); if (engine->isActive() && engine->paintDevice() != this) { d->engine = new QGL2PaintEngineEx; return d->engine; } return engine; #if !defined (QT_OPENGL_ES_2) } #endif #endif #if !defined(QT_OPENGL_ES_2) QPaintEngine *engine = qt_buffer_engine(); if (engine->isActive() && engine->paintDevice() != this) { d->engine = new QOpenGLPaintEngine; return d->engine; } return engine; #endif }
bool QGLPixmapData::useFramebufferObjects() const { #ifdef Q_OS_SYMBIAN // We don't want to use FBOs on Symbian return false; #else return QGLFramebufferObject::hasOpenGLFramebufferObjects() && QGLFramebufferObject::hasOpenGLFramebufferBlit() && qt_gl_preferGL2Engine() && (w * h > 32*32); // avoid overhead of FBOs for small pixmaps #endif }
/*! \reimp */ QPaintEngine *QGLPixelBuffer::paintEngine() const { #if defined(QT_OPENGL_ES_1) return qt_buffer_engine()->engine(); #elif defined(QT_OPENGL_ES_2) return qt_buffer_2_engine()->engine(); #else if (qt_gl_preferGL2Engine()) return qt_buffer_2_engine()->engine(); else return qt_buffer_engine()->engine(); #endif }
bool QGLPixmapData::useFramebufferObjects() { return QGLFramebufferObject::hasOpenGLFramebufferObjects() && QGLFramebufferObject::hasOpenGLFramebufferBlit() && qt_gl_preferGL2Engine(); }