Esempio n. 1
0
    void update() {
        if( goFullscreen == 2 ){
            ofSetFullscreen(false);
            ofSetWindowPosition(1920, 0);
        }
        if( goFullscreen == 4 ){
            ofSetFullscreen(true);
            ofViewport(ofGetNativeViewport());
        }
        goFullscreen++;
        if(goFullscreen > 4 && ofGetWindowPositionX() < 1440) {
            goFullscreen = 0;
        }
        
        renderTimer.tick();
        while(osc.hasWaitingMessages()) {
            ofxOscMessage msg;
            osc.getNextMessage(&msg);
            if(msg.getAddress() == "/lookAngle/set") {
                targetLookAngle = msg.getArgAsFloat(0);
            }
            if(msg.getAddress() == "/lookAngle/add") {
                targetLookAngle += msg.getArgAsFloat(0);
                ofLog() << "targetLookAngle: " << targetLookAngle;
            }
            if(msg.getAddress() == "/screenshot") {
                saveScreen("button/");
            }
        }
        lookAngle = ofLerp(lookAngle, targetLookAngle, .1);
        if(screenshotTimer.tick()) {
//            saveScreen("automatic/"); // uncomment to enable automatic screenshot
        }
	}
Esempio n. 2
0
	void update() {
		if(cam.update()) {
			timer.tick();
		}
	}