//======================================================================== int main( ){ ofSetupOpenGL(600,400, 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: TIME_SAMPLE_DISABLE_AVERAGE(); ofRunApp( new ofApp()); }
//======================================================================== int main( ){ ofAppGLFWWindow win; win.setNumSamples(0); //win.setOrientation(OF_ORIENTATION_90_LEFT); //win.setMultiDisplayFullscreen(true); //win.set ofSetupOpenGL(&win, 1800,400, OF_WINDOW); // <-------- setup the GL context TIME_SAMPLE_SET_FRAMERATE(60); TIME_SAMPLE_DISABLE_AVERAGE(); TIME_SAMPLE_SET_DRAW_LOCATION(TIME_MEASUREMENTS_TOP_RIGHT); // this kicks off the running of my app // can be OF_WINDOW or OF_FULLSCREEN // pass in width and height too: ofRunApp(new testApp()); }
void testApp::setup(){ ofBackground(22); TIME_SAMPLE_SET_FRAMERATE( 60.0f ); //set the app's target framerate (MANDATORY) //specify where the widget is to be drawn TIME_SAMPLE_SET_DRAW_LOCATION( TIME_MEASUREMENTS_TOP_RIGHT ); //specify a drawing location (OPTIONAL) TIME_SAMPLE_SET_AVERAGE_RATE(0.1); //averaging samples, (0..1], //1.0 gets you no averaging at all //use lower values to get steadier readings TIME_SAMPLE_DISABLE_AVERAGE(); //disable averaging TIME_SAMPLE_SET_REMOVE_EXPIRED_THREADS(true); //inactive threads will be dropped from the table //customize color //TIME_SAMPLE_GET_INSTANCE()->setHighlightColor(ofColor::yellow); startThread(); }