Ejemplo n.º 1
0
int main(int argc, char **argv)
{
	
	
	//start QT GUI
	QApplication app(argc, argv);

	/*The format includes the size of the color buffers, red, green, and blue; 
	the size of the alpha buffer; the size of the depth and stencil buffers;
	and number of samples per pixel for multisampling.
	In addition, the format contains surface configuration parameters such as OpenGL profile
	and version for rendering, whether or not to enable stereo buffers, and swap behaviour.*/
	//QSurfaceFormat format;
	// Set the preferred number of samples per pixel when multisampling is enabled.
	//format.setSamples(16);

	 MainApplication window;

	
	window.show();



	return app.exec();
}
Ejemplo n.º 2
0
bool MyApp::OnInit()
{
  	strcpy(execPath, ".");

	new MainApplication(wxT("MainApplication - Lua"), wxPoint(300,300),
				     wxSize(800, 600)); // Create an instance of our frame, or window
	MainApplication *mainApp = MainApplication::getInstancePtr();
	mainApp->Show(TRUE); // show the window
  	//SetTopWindow(mainApp);// and finally, set it as the main window

LuaScriptEngine *eng = new LuaScriptEngine();
eng->loadEngine();
eng->runScript("./test.lua");

/*
   // test code
    wxFrame *frame = new wxFrame((wxFrame *)NULL, -1,  wxT("Hello GL World"), wxPoint(300,300), wxSize(480,320));
    new AnimationView(frame); 
    frame->Show(TRUE);
*/

  Animation *anim = new Animation("./animations/avatar_express_sad.bvh");
  mainApp->animVwr->setAnimation(anim);
 for (int i=0; i<1000; i++) {
   mainApp->animVwr->render();
   mainApp->animVwr->getAnimation()->stepForward();
 }
  
    return TRUE;
}
Ejemplo n.º 3
0
int main(int argc, char*argv[]) {

    MainApplication app;
    globalapp = &app;
   
    signal (SIGINT, timeToDie);

    return app.run();
}
Ejemplo n.º 4
0
int main( int argc, char *argv[] ) 
{
	
QApplication::setColorSpec(QApplication::ManyColor);
QApplication app(argc, argv);
app.setStyle( "plastique" ); 
app.setStyle("windowsxp"); 
MainApplication mainWin;

mainWin.show();

return app.exec();

}
Ejemplo n.º 5
0
    int main(int argc, char *argv[])
    {
            srand(time(NULL));
        // Create application object
        MainApplication app;

        try {
            app.go();
        } catch( Ogre::Exception& e ) {
            std::cerr << "An exception has occured: " <<
                e.getFullDescription().c_str() << std::endl;
        }

        return 0;
    }
Ejemplo n.º 6
0
int main(int argc, char *argv[])
{
    QtSingleApplication a(argc, argv);
    if (a.isRunning()) {
        return 0;
    }
    a.setApplicationName("AirTV");

    if (!QSystemTrayIcon::isSystemTrayAvailable())  {
        QMessageBox::critical(0, QObject::tr("Systray"),
                              QObject::tr("I couldn't detect any system tray "
                                          "on this system."));
        return 1;
    }
    QApplication::setQuitOnLastWindowClosed(false);

    MainApplication m;
    QObject::connect(&m, SIGNAL(quitRequested()), &a, SLOT(quit()));
    QObject::connect(&a, SIGNAL(aboutToQuit()), &m, SLOT(aboutToQuit()));
    m.start();

    return a.exec();
}