Пример #1
0
void ofApp::setup(){

	ofSetFrameRate(60);
	ofSetVerticalSync(true);
	ofEnableAlphaBlending();
	ofBackground(22);

	TIME_SAMPLE_ENABLE();
	scale = scaleTarget = 1.0;

	// LOAD ATLAS /////////////////////////////////////////////////

	altasLoaded = false;
	ofAddListener(atlasCreator.eventAllAtlasesLoaded, this, &ofApp::onAtlasesLoaded);
	atlasCreator.loadAtlasesFromDisk(GL_RGBA, //internal format
									 "textureCache", //dir
									 "png", //image format
									 true, //gen mipmaps
									 -0.9 //mipmap bias
									 );

	////////////////////////////////////////////////////////

	RUI_SETUP();
	RUI_SHARE_PARAM(p, -100, 100);
	RUI_LOAD_FROM_XML();
}
Пример #2
0
//--------------------------------------------------------------
void ofApp::setup(){

	fonts.setup(512);
	fonts.addFont("veraMono", "fonts/VeraMono.ttf");
	fonts.addFont("veraMonoBold", "fonts/VeraMono-Bold.ttf");
	fonts.addFont("Helvetica", "fonts/HelveticaNeue.ttf");

	ofxFontStashStyle style;
	style.fontID = "veraMono";
	style.fontSize = 14;
	style.color = ofColor::yellow;
	fonts.addStyle("banana", style);

	style.color = ofColor::brown;
	fonts.addStyle("monkey", style);

	fonts.setLineHeightMult(0.9);
	ofBackground(22);
	TIME_SAMPLE_ENABLE();
	TIME_SAMPLE_SET_AVERAGE_RATE(0.01);
	TIME_SAMPLE_SET_DRAW_LOCATION(TIME_SAMPLE_DRAW_LOC_TOP_RIGHT);

	RUI_SETUP();
	RUI_SHARE_PARAM(debug);
	RUI_LOAD_FROM_XML();

}
Пример #3
0
//--------------------------------------------------------------
void ofApp::setup(){
    ofLogToFile("log.txt", true);
    //ofSetLogLevel(OF_LOG_VERBOSE);
    ofSetWindowShape(1280, 900);

    ofSetFrameRate(60);
    ofSetVerticalSync(true);
    ofEnableAlphaBlending();

    TIME_SAMPLE_SET_FRAMERATE(60);
    TIME_SAMPLE_ENABLE();

    // setup ofxRemoteUI
    RUI_SETUP();
    RUI_SET_CALLBACK(ruiServerCallback);
    // TODO: setup params here
    RUI_NEW_GROUP("App");
    RUI_DEFINE_VAR_WV(bool, "app-fullscreen", false);
    arTest.setupParams();
    RUI_LOAD_FROM_XML();
    
    arTest.setup();
}