From 82f4504bb849a60a74df906064a426b1c5759f09 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Mon, 26 Mar 2018 22:44:37 +0100 Subject: correct syphon export --- gui/src/main.cpp | 15 ++++++++------- gui/src/ofApp.cpp | 20 ++++++++++---------- gui/src/ofApp.h | 12 ++++++------ 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/gui/src/main.cpp b/gui/src/main.cpp index dc65931..14f4f21 100644 --- a/gui/src/main.cpp +++ b/gui/src/main.cpp @@ -1,7 +1,7 @@ #include "ofMain.h" #include "ofApp.h" -#define PREVIEW_WINDOW +//#define PREVIEW_WINDOW //======================================================================== int main(int argc, char *argv[]){ @@ -60,15 +60,16 @@ int main(int argc, char *argv[]){ shared_ptr mainApp(new ofApp); //mainApp->setupGui(); - ofAddListener(mainWindow->events().update,mainApp.get(),&ofApp::updateOutput); - ofAddListener(mainWindow->events().draw,mainApp.get(),&ofApp::drawOutput); - ofAddListener(mainWindow->events().windowResized,mainApp.get(),&ofApp::outputWindowResized); - ofAddListener(mainWindow->events().keyPressed,mainApp.get(),&ofApp::outputKeyPressed); + ofAddListener(guiWindow->events().update,mainApp.get(),&ofApp::updateGui); + ofAddListener(guiWindow->events().draw,mainApp.get(),&ofApp::drawGui); + //ofAddListener(mainWindow->events().windowResized,mainApp.get(),&ofApp::windowResized); + ofAddListener(guiWindow->events().fileDragEvent,mainApp.get(),&ofApp::guiDragEvent); + ofAddListener(guiWindow->events().keyPressed,mainApp.get(),&ofApp::guiKeyPressed); #ifdef PREVIEW_WINDOW - ofAddListener(previewWindow->events().draw,mainApp.get(),&ofApp::drawOutput); + ofAddListener(previewWindow->events().draw,mainApp.get(),&ofApp::draw); #endif - ofRunApp(guiWindow, mainApp); + ofRunApp(mainWindow, mainApp); ofRunMainLoop(); } \ No newline at end of file diff --git a/gui/src/ofApp.cpp b/gui/src/ofApp.cpp index a5c80ad..570dfb3 100644 --- a/gui/src/ofApp.cpp +++ b/gui/src/ofApp.cpp @@ -62,7 +62,7 @@ void ofApp::setup(){ } //-------------------------------------------------------------- -void ofApp::update(){ +void ofApp::updateGui(ofEventArgs & args){ std::stringstream strm; strm << "fps: " << ofGetFrameRate(); @@ -70,7 +70,7 @@ void ofApp::update(){ } -void ofApp::updateOutput(ofEventArgs & args){ +void ofApp::update(){ for (int i=0;i arguments; @@ -141,7 +141,7 @@ class ofApp : public ofBaseApp, public ofxMidiListener{ ofxSyphonServer mainOutputSyphonServer; // ofxSyphonServer individualTextureSyphonServer; - ofxSyphonClient mClient; + //ofxSyphonClient mClient; bool bSmooth; -- cgit v1.2.3