示例#1
0
文件: main.cpp 项目: minimoog/fluid
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

#if defined(Q_WS_X11)
    XInitThreads();
#endif

    GLWindow *glwindow = new GLWindow();
    glwindow->create();
    glwindow->setWindowState(Qt::WindowNoState);
    glwindow->showFullScreen();
    glwindow->resume();

    int result = a.exec();

    glwindow->destroy();
    delete glwindow;

    //QCoreApplication::setAttribute(Qt::AA_NativeWindows, true);
    //QCoreApplication::setAttribute(Qt::AA_ImmediateWidgetCreation, true);

    //return a.exec();

    return result;
}
示例#2
0
// workaround for issue seen on Windows 7 with NVIDIA 
void triggerStereo()
{
    // attributes for an OpenGL stereo window
    GLWindow::Attributes attributes;
    attributes[WGL_STEREO_ARB] = GL_TRUE;

    // create and destroy a small stereo window: this is here to work around
    // an issue with windows failing to switch to quad-buffer mode (although
    // the window is successfully created and reports a stereo pixel format)
    // note: the window is invisible (not shown) but typically causes the
    // windows desktop to flash briefly (first run only) as stereo activates
    GLWindow window;
    window.create( 0, "", 0, 0, 0, 8, 8, 0, 0, DefWindowProc, 0, attributes );
    window.destroy();
}