Esempio n. 1
0
//--------------------------------------------------------------
void AppCore::draw() {

	sceneManager.draw();
	
	if(global.errorOcurred()) {
		ofSetColor(0);
		ofxBitmapString(11, 11) << global.getErrorMessage();
		ofSetColor(255);
		ofxBitmapString(10, 10) << global.getErrorMessage();
	}
	
	global.gui.console.draw();
	global.gui.drawFps();
	global.gui.draw();
}
Esempio n. 2
0
///--------------------------------------------------------------
void ofApp::draw()
{
    ofColor debugMessagesColor = ofColor(127);

    if (showFPS && sceneManager.getCurrentSceneIndex() != -1)
    {
        ofSetColor(debugMessagesColor);
        ofxBitmapString(15, ofGetHeight() - 15) << roundf(ofGetFrameRate()) << "fps" << endl;
    }

#if OF_DEBUG
    ofSetColor(debugMessagesColor);
    ofxBitmapString(15, ofGetHeight()-28)
            << "[Current Scene] ID: " << sceneManager.getCurrentSceneIndex()
            << " Name: " << sceneManager.getCurrentSceneName()
            << " Screen Size: " << ofGetWidth()<<" "<<ofGetHeight() << endl;
#endif

    ofSetColor(ofColor::white);
}
Esempio n. 3
0
//--------------------------------------------------------------
void ofApp::draw() {

    // the current scene is automatically drawn before this function

    // show the render area edges with a white rect
    if(isDebug()) {
        ofNoFill();
        ofSetColor(255);
        ofSetRectMode(OF_RECTMODE_CORNER);
        ofDrawRectangle(1, 1, getRenderWidth()-2, getRenderHeight()-2);
        ofFill();
    }

    // drop out of the auto transform space back to OF screen space
    transformer.pop();

#ifdef HAVE_OFX_GUI
    // draw the transform panel when in debug mode
    if(isDebug()) {
        panel.draw();
    }
#endif

    // draw current scene info using the ofxBitmapString stream interface
    // to ofDrawBitmapString
    ofSetColor(200);
    ofxBitmapString(12, ofGetHeight()-8)
            << "Current Scene: " << sceneManager.getCurrentSceneIndex()
            << " " << sceneManager.getCurrentSceneName() << endl;

    // go back to the auto transform space
    //
    // this is actually done automatically if the transformer is set but
    // included here for completeness
    transformer.push();

    // the warp editor is drawn automatically after this function
}