Пример #1
0
//========================================================================
int main( ) {


    ofGLFWWindowSettings settings;

    settings.width = 700;
    settings.height = 800;
    settings.setPosition(ofVec2f(0,0));
    settings.resizable = false;
    shared_ptr<ofAppBaseWindow> guiWindow = ofCreateWindow(settings);

    settings.width = 1280;  // 1920
    settings.height = 720;  // 1080
    settings.resizable = true;
    settings.setPosition( ofVec2f(1440, 0 ));
//    settings.windowMode = OF_FULLSCREEN;
    shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings);

    shared_ptr<GuiApp> guiApp(new GuiApp);
    shared_ptr<ofApp> mainApp(new ofApp);
    mainApp->gui = guiApp;

    ofRunApp(mainWindow, mainApp);
    ofRunApp(guiWindow, guiApp);
    ofRunMainLoop();


}
Пример #2
0
int main( ){

	#ifdef STANDALONE_PLAYER
	// TODO: Fix standalone launcher
	// ofGLWindowSettings settings;
	// settings.setGLVersion(3, 2);
	// settings.width = 300;
	// settings.height = 800;
	// ofCreateWindow(settings);

	// ofGLWindowSettings demoSettings;
	// demoSettings.setGLVersion(3, 2);
	// ofRunApp(new ofConfig(&demoSettings));

	// ofCreateWindow(demoSettings);
	// ofRunApp(new ofApp());


	ofGLWindowSettings settings;
	settings.setGLVersion(3, 2);
	settings.windowMode = OF_FULLSCREEN;
	ofCreateWindow(settings);
	ofRunApp(new ofApp());
	#else
	ofGLWindowSettings settings;
	settings.setGLVersion(3, 2);
	ofCreateWindow(settings);
	ofRunApp(new ofApp());
	#endif

}
Пример #3
0
int main(){
	ofSetLogLevel(OF_LOG_VERBOSE);
#if defined(TARGET_OPENGLES)
	#if (OF_VERSION_MINOR == 9)
        ofGLESWindowSettings settings;
        settings.width = 1280;
        settings.height = 720;
        settings.setGLESVersion(2);
        ofCreateWindow(settings);
    #else
        ofSetLogLevel("ofThread", OF_LOG_ERROR);
        ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);
        ofSetupOpenGL(1280, 720, OF_WINDOW);
    #endif
#else
#ifdef FORCE_PROGRAMMMABLE
	ofGLWindowSettings glWindowSettings;
	glWindowSettings.width = 1280;
	glWindowSettings.height = 720;
	glWindowSettings.setGLVersion(3, 2);
	ofCreateWindow(glWindowSettings);
#else
	ofSetLogLevel("ofThread", OF_LOG_ERROR);
    ofSetupOpenGL(1280, 720, OF_WINDOW);
#endif

#endif
	//ofSetupOpenGL(1024,768, OF_WINDOW);			// <-------- setup the GL context

	// this kicks off the running of my app
	// can be OF_WINDOW or OF_FULLSCREEN
	// pass in width and height too:
	ofRunApp( new ofApp() );
	return 0;
}
Пример #4
0
//========================================================================
int main( ){
	ofGLFWWindowSettings settings;
	settings.width = 600;
	settings.height = 600;
	settings.setPosition(ofVec2f(300,0));
	settings.resizable = true;
	shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings);

	settings.width = 300;
	settings.height = 300;
	settings.setPosition(ofVec2f(0,0));
	settings.resizable = false;
	// uncomment next line to share main's OpenGL resources with gui
	//settings.shareContextWith = mainWindow;	
	shared_ptr<ofAppBaseWindow> guiWindow = ofCreateWindow(settings);
	guiWindow->setVerticalSync(false);

	shared_ptr<ofApp> mainApp(new ofApp);
	mainApp->setupGui();
	ofAddListener(guiWindow->events().draw,mainApp.get(),&ofApp::drawGui);

	ofRunApp(mainWindow, mainApp);
	ofRunMainLoop();

}
Пример #5
0
//========================================================================
int main( ){
    //	ofSetupOpenGL(500,250,OF_WINDOW);			// <-------- setup the GL context
    //
    //	// this kicks off the running of my app
    //	// can be OF_WINDOW or OF_FULLSCREEN
    //	// pass in width and height too:
    //	ofRunApp(new ofApp());
    
    ofGLFWWindowSettings settings;
    settings.width = 500;
    settings.height = 250;
    settings.setPosition(ofVec2f(300,0));
    settings.resizable = true;
    shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings);
    
    settings.width = 300;
    settings.height = 300;
    settings.setPosition(ofVec2f(0,0));
    settings.resizable = false;
    // uncomment next line to share main's OpenGL resources with gui
    //settings.shareContextWith = mainWindow;
    shared_ptr<ofAppBaseWindow> guiWindow = ofCreateWindow(settings);
    guiWindow->setVerticalSync(false);
    
    shared_ptr<ofApp> mainApp(new ofApp);
    mainApp->setupMonitor();
    ofAddListener(guiWindow->events().draw,mainApp.get(),&ofApp::drawMonitor);
    
    ofRunApp(mainWindow, mainApp);
    ofRunMainLoop();
    
}
Пример #6
0
//========================================================================
int main( ){
	ofGLFWWindowSettings settings;

	settings.width = 600;
	settings.height = 600;
	settings.setPosition(ofVec2f(300,0));
	settings.resizable = true;
	settings.numSamples = 8;
	shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings);

	settings.width = 300;
	settings.height = 300;
	settings.setPosition(ofVec2f(0,0));
	settings.resizable = false;
	settings.numSamples = 4;
	settings.shareContextWith = mainWindow;
	shared_ptr<ofAppBaseWindow> guiWindow = ofCreateWindow(settings);

	shared_ptr<ofApp> mainApp(new ofApp);
	shared_ptr<GuiApp> guiApp(new GuiApp);

	mainApp->gui = guiApp;
	mainApp->window = mainWindow;
	mainApp->gl = dynamic_pointer_cast<ofBaseGLRenderer>(mainWindow->renderer());

	ofRunApp(guiWindow, guiApp);
	ofRunApp(mainWindow, mainApp);
	ofRunMainLoop();

}
Пример #7
0
int main()
{
    ofWindowSettings settings;
    auto window = ofCreateWindow(settings);
    auto app = std::make_shared<ofApp>();
    ofRunApp(app);
}
Пример #8
0
// This is the "main" function. It is the entry point to the program. Every
// computer program has a starting point, and this is it!
int main()
{
    // Create some defaul window settings.
    ofGLWindowSettings settings;

    // Set the width of the initial window.
    settings.width = 800;

    // Set the height of the initial window.
    settings.height = 800;

    // Create a window with the ofGLWindowSettings.
    ofCreateWindow(settings);

    // Create the application instance.
    auto app = std::make_shared<ofApp>();

    // Run the app that was just created. When it is finished running, the
    // program will return an exit "code". The operating system can use this
    // code to determine if the program ran into any problems while it was
    // running.
    int result = ofRunApp(app);

    // The program is now complete and we return the result code to the calling
    // process, which is normally owned by the operating system.
    return result;
}
Пример #9
0
int main( ){
	ofGLFWWindowSettings winSettings;
	winSettings.numSamples = 8;
	winSettings.width = 1920 + 1920 + 1200;
	winSettings.height = 1200;
	winSettings.decorated = false;
	winSettings.multiMonitorFullScreen = true;
	//winSettings.monitor = 1;

#ifdef TARGET_WIN32
	winSettings.width = 1200 * 10;
	winSettings.height = 1920;
#endif

	//	winSettings.width = 1200 * 6;
	//	winSettings.height = 1920 * 2;


	shared_ptr<ofAppBaseWindow> win = ofCreateWindow(winSettings);	// sets up the opengl context!
#ifdef TARGET_OSX
	((ofAppGLFWWindow*)win.get())->setWindowPosition(-1920, 0);
#endif

	ofRunApp(win, shared_ptr<ofBaseApp>(new testApp()));
	ofRunMainLoop();

}
Пример #10
0
//========================================================================
int main( ){
//
//	ofSetupOpenGL(1280, 720, OF_WINDOW);			// <-------- setup the GL context
//
//	// this kicks off the running of my app
//	// can be OF_WINDOW or OF_FULLSCREEN
//	// pass in width and height too:
//	ofRunApp( new ofApp());
    ofGLFWWindowSettings settings;
    
    settings.width = 1280;
    settings.height = 720;
    settings.windowMode = OF_WINDOW;
    settings.multiMonitorFullScreen = true;
	// settings.glVersionMajor = 4;
	// settings.glVersionMinor = 1;
	// settings.glVersionMajor = 1;
	// settings.glVersionMinor = 1;
    ofCreateWindow(settings);
    
    // this kicks off the running of my app
    // can be OF_WINDOW or OF_FULLSCREEN
    // pass in width and height too:
    ofRunApp(new ofApp());
}
Пример #11
0
//========================================================================
int main( ){
//	ofSetupOpenGL(1024,768,OF_WINDOW);			// <-------- setup the GL context
	
	ofGLWindowSettings settings;
	settings.setGLVersion(3, 2);  // Programmable pipeline
	
	settings.width = 1024;
	settings.height = 768;
	ofCreateWindow(settings);
	

	if(!ofGLCheckExtension("GL_ARB_geometry_shader4") && !ofGLCheckExtension("GL_EXT_geometry_shader4") && !ofIsGLProgrammableRenderer()){
		ofLogFatalError() << "geometry shaders not supported on this graphics card";
		return 1;
	}
	
	GLint major;
	GLint minor;
	glGetIntegerv(GL_MAJOR_VERSION, &major);
	glGetIntegerv(GL_MINOR_VERSION, &minor);
	
	ofLogNotice() << "opengl: " << major << "." << minor;
	
	// this kicks off the running of my app
	// can be OF_WINDOW or OF_FULLSCREEN
	// pass in width and height too:
	ofRunApp(new ofApp());

}
Пример #12
0
int main(){
	ofGLESWindowSettings settings;
	settings.glesVersion = 3;
	ofCreateWindow(settings);
	ofRunApp(new ofApp());
	return 0;
}
Пример #13
0
int main() {
    ofSetLogLevel(OF_LOG_VERBOSE);
    ofJson config = ofLoadJson("../../../SharedData/settings.json");
    
    shared_ptr<ofAppNoWindow> winServer(new ofAppNoWindow);
    shared_ptr<ServerApp> appServer(new ServerApp);
    ofRunApp(winServer, appServer);
    
    ofGLFWWindowSettings settings;
    settings.setGLVersion(3,2);
    settings.decorated = false;
    settings.numSamples = 1;
    settings.resizable = true;
    
    int n = config["projectors"].size();
    for(int i = 0; i < n; i++) {
        ofJson curConfig = config["projectors"][i];
        settings.monitor = curConfig["monitor"];
        settings.setSize(curConfig["width"], curConfig["height"]);
        settings.setPosition(ofVec2f(curConfig["xwindow"], curConfig["ywindow"]));
        settings.multiMonitorFullScreen = curConfig["multimonitor"];
        settings.windowMode = curConfig["fullscreen"] ? OF_FULLSCREEN : OF_WINDOW;
        shared_ptr<ofAppBaseWindow> winClient = ofCreateWindow(settings);
        shared_ptr<ClientApp> appClient(new ClientApp);
        appClient->config(i, appServer);
        ofRunApp(winClient, appClient);
    }
    
    ofRunMainLoop();
}
Пример #14
0
//--------------------------------------------------------------
int main(){
    ofGLWindowSettings settings;
    settings.setGLVersion(3,2);
    settings.windowMode = OF_FULLSCREEN;
    ofCreateWindow(settings);
    ofRunApp(new ofApp());
}
Пример #15
0
int main()
{
    ofGLWindowSettings settings;
    settings.setSize(640, 480);
    ofCreateWindow(settings);
    return ofRunApp(std::make_shared<ofApp>());
}
Пример #16
0
int main(int argc, const char** argv)
{

	//ARGS
	ofxArgParser::init(argc, argv);

	ofSetLogLevel(OF_LOG_NOTICE);
	//ofSetLogLevel(OF_LOG_WARNING);

	ofLog(OF_LOG_NOTICE,"-HP- WOKE UP ");

	//ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);
	//ofSetupOpenGL(1280, 720, OF_FULLSCREEN);*
	ofGLESWindowSettings settings;
  settings.width = 1280;
  settings.height = 720;
  settings.setGLESVersion(2);
	settings.windowMode = OF_FULLSCREEN;
  ofCreateWindow(settings);

	//ofToggleFullscreen();
	ofBackground(0, 255);
	ofSetFrameRate(30);

	ofRunApp( new HPlayer());
}
Пример #17
0
//========================================================================
int main( ){
    ofGLWindowSettings settings;
    settings.setGLVersion(4, 0);
    ofCreateWindow(settings);   // <-------- setup the GL context

	ofRunApp(new ofApp());

}
Пример #18
0
//========================================================================
int main( ){
    ofGLWindowSettings settings;
    settings.setGLVersion(2,1); // last version where fixed pipeline was default
    // settings.setGLVersion(3,2); // use programmable renderer
    ofCreateWindow(settings);
    
    ofRunApp(new testApp());
}
Пример #19
0
int main() {
    ofGLWindowSettings settings;
    settings.width = 1280;
    settings.height = 800;
    settings.setGLVersion(4, 1);
    ofCreateWindow(settings);
	ofRunApp(new ofApp());
}
Пример #20
0
//========================================================================
int main()
{
	ofGLFWWindowSettings settings;
	settings.setGLVersion(3, 2);
	settings.setSize(1280, 720);
	ofCreateWindow(settings);

	ofRunApp(new ofApp());
}
Пример #21
0
int main()
{
	ofGLWindowSettings settings;
	settings.setGLVersion(3, 2);
	settings.width = 1024;
	settings.height = 768;
	ofCreateWindow(settings);
	ofRunApp(std::make_shared<ofApp>());
}
Пример #22
0
//========================================================================
int main( ){
    ofGLWindowSettings settings;
    settings.setGLVersion(3, 2);
    settings.width = 1024;
    settings.height = 768;
    ofCreateWindow(settings);
    
	ofRunApp(new ofApp());
}
Пример #23
0
int main()
{
    ofSetLogLevel(OF_LOG_VERBOSE);
    ofGLESWindowSettings settings;
    settings.setSize(1280, 720);
    settings.setGLESVersion(2);
    ofCreateWindow(settings);
    ofRunApp( new ofApp());
}
//========================================================================
int main( ) {
    ofSetLogLevel(OF_LOG_VERBOSE);
    ofGLESWindowSettings settings;
    settings.width = 1280;
    settings.height = 720;
    settings.setGLESVersion(2);
    ofCreateWindow(settings);
    ofRunApp( new ofApp());
}
Пример #25
0
//========================================================================
int main( )
{
    ofGLWindowSettings settings_;
    settings_.setGLVersion(3, 2);
    settings_.width = 1280;
    settings_.height = 720;
    ofCreateWindow(settings_);
    
	ofRunApp(new ofApp());
}
Пример #26
0
//========================================================================
int main( ){
	//ofSetupOpenGL(1024,768,OF_WINDOW);			// <-------- setup the GL context
	//ofRunApp(new ofApp());
    ofGLWindowSettings settings;
    settings.setGLVersion(3, 2);  // Programmable pipeline
    settings.width = 1024;
    settings.height = 768;
    ofCreateWindow(settings);
    ofRunApp(new ofApp());
}
Пример #27
0
int main()
{
  ofGLFWWindowSettings settings;

  auto window = ofCreateWindow(settings);
  auto app = make_shared<ofApp>();
  ofRunApp(window, app);

  return ofRunMainLoop();
}
Пример #28
0
//========================================================================
int main( ){
	ofGLFWWindowSettings windowSettings;
	windowSettings.setGLVersion(2, 0); //according to http://www.glfw.org/docs/latest/window.html#window_hints GLFW will attempt to provide the highest supported context version if you specify 1.0
	windowSettings.width = 1920;
	windowSettings.height = 1080;
	windowSettings.windowMode = OF_WINDOW;
	auto window = ofCreateWindow(windowSettings);

	ofRunApp(new ofApp());
}
Пример #29
0
//========================================================================
int main( ){
    ofGLWindowSettings settings;
    settings.setGLVersion(3,2);
    ofCreateWindow(settings);
    
    // this kicks off the running of my app
    // can be OF_WINDOW or OF_FULLSCREEN
    // pass in width and height too:
    ofRunApp(new ofApp());
}
Пример #30
0
//========================================================================
int main()
{
	ofGLFWWindowSettings settings;
	settings.setGLVersion(4, 1);
	settings.width = 1920;
	settings.height = 1080;
	settings.multiMonitorFullScreen = true;
	ofCreateWindow(settings);

	ofRunApp(new ofApp());
}