Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QGL::setPreferredPaintEngine( QPaintEngine::OpenGL2 );
- QGLFormat glFmt = QGLFormat::defaultFormat();
- glFmt.setSwapInterval( 0 ); // 1= vsync on
- glFmt.setAlpha( false );
- glFmt.setRgba( true );
- glFmt.setDoubleBuffer( true ); // default
- glFmt.setOverlay( false );
- QGLFormat::setDefaultFormat( glFmt );
- glFmt.setSampleBuffers( true ); // must true for anti-aliasing
- QGLWidget *glWidget = new QGLWidget( glFmt );
- //### potentially faster, but causes junk to appear if top-level is Item, not Rectangle
- glWidget->setAutoFillBackground( false );
- viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
- viewer.setMainQmlFile(QLatin1String("qml/shotMe/main.qml"));
- viewer.setViewportUpdateMode( QGraphicsView::FullViewportUpdate );
- viewer.setViewport( glWidget );
- viewer.showFullScreen();
Add Comment
Please, Sign In to add comment