问题
How to make a hardware overlay in Qt 5.1?
This is what I have so far:
QGLFormat fmt;
fmt.setSamples(16);
fmt.setOverlay(true);
MainWidget w(fmt);
w.show();
////////////////////////////////////////////////////////////////////////////////
MainWidget::MainWidget(const QGLFormat &format, QWidget *parent)
: QGLWidget(format, parent)
{
qDebug() << format().hasOverlay() ?
"Hardware overlay is supported" : "No hardware overlay support";
qDebug() << "OpenGL " +
QString::number(this->format().majorVersion()) + "." +
QString::number(this->format().minorVersion());
}
But it always returns false :(
OpenGL version is 4.3
Video card is GeForce GT 650M
回答1:
Hardware Overlays are not a standard feature. No consumer grade GPU supports them (well, their hardware could, but the drivers don't). You need a Quadro or a FireGL GPU for hardware overlays to become available.
来源:https://stackoverflow.com/questions/18200763/opengl-hadware-overlay