#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ // listen on the given port cout << "listening for osc messages on port " << PORT << "\n"; receiver.setup(PORT); /* ofxUDPSettings settings; settings.receiveOn(PORT); settings.blocking = false; udpConnection.Setup(settings); */ current_msg_string = 0; mouseX = 0; mouseY = 0; mouseButtonState = ""; ofSetWindowTitle("osc receiver"); poly.clear(); //ofSetFrameRate(50); copy_polys=1000; create_polys=0; ofSetFrameRate(60); } //-------------------------------------------------------------- void ofApp::update(){ // hide old messages for(int i = 0; i < NUM_MSG_STRINGS; i++){ if(timers[i] < ofGetElapsedTimef()){ msg_strings[i] = ""; } } int received_frames=0; int dumped_frames=0; int numpoints=0; ofBuffer buf; // check for waiting messages while(receiver.hasWaitingMessages()){ // get the next message ofxOscMessage m; receiver.getNextMessage(m); //cout << "got a message " << m.getAddress() << " args: "<< m.getNumArgs() << std::endl;; if(m.getAddress() == "/points"){ // both the arguments are float's //for (int i=0;i': create_polys+=10; break; } } //-------------------------------------------------------------- void ofApp::keyReleased(int key){ } //-------------------------------------------------------------- void ofApp::mouseMoved(int x, int y){ } //-------------------------------------------------------------- void ofApp::mouseDragged(int x, int y, int button){ } //-------------------------------------------------------------- void ofApp::mousePressed(int x, int y, int button){ } //-------------------------------------------------------------- void ofApp::mouseReleased(int x, int y, int button){ } //-------------------------------------------------------------- void ofApp::mouseEntered(int x, int y){ } //-------------------------------------------------------------- void ofApp::mouseExited(int x, int y){ } //-------------------------------------------------------------- void ofApp::windowResized(int w, int h){ } //-------------------------------------------------------------- void ofApp::gotMessage(ofMessage msg){ } //-------------------------------------------------------------- void ofApp::dragEvent(ofDragInfo dragInfo){ }