void MilluminApp::setup() { listener.setup(5001); host = "127.0.0.1"; port = 5000; sender.setup(host, port); mTex = gl::Texture(200, 100); //create our texture to publish mSurface = Surface8u(200, 100, false); //create a surface to manipulate randomizeSurface(&mSurface); //randomize our surface mTex.update(mSurface); //tell the texture about our changes archimedes.set(100.f, 0.6f); //set up and calculate our spiral archimedes.calc(); mRot = 0.f; mScreenSyphon.setName("Cinder Screen"); // set a name for each item to be published mTextureSyphon.setName("Cinder Texture"); mClientSyphon.setup(); // in order for this to work, you must run simple server from the testapps directory // any other syphon item you create would work as well, just change the name mClientSyphon.setApplicationName("Simple Server"); mClientSyphon.setServerName(""); mClientSyphon.bind(); }
void SyphonBasicApp::setup() { try { mLogo = gl::Texture::create( loadImage( loadAsset("cinder_logo_alpha.png") ) ); } catch( ... ) { std::cout << "unable to load the texture file!" << std::endl; } try { mShader = gl::GlslProg::create( loadAsset("passThru_vert.glsl"), loadAsset("gaussianBlur_frag.glsl") ); } catch( gl::GlslProgCompileExc &exc ) { std::cout << "Shader compile error: " << std::endl; std::cout << exc.what(); } catch( ... ) { std::cout << "Unable to load shader" << std::endl; } mAngle = 0.0f; mScreenSyphon.setName("Screen Output"); // set a name for each item to be published mTextureSyphon.setName("Texture Output"); mClientSyphon.setup(); // in order for this to work, you must run simple server which is a syphon test application // feel free to change the app and server name for your specific case mClientSyphon.set("", "Simple Server"); mClientSyphon.bind(); }
void SyphonServerDirectoryApp::setClient(int _idx){ if(dir.isValidIndex(_idx)){ syphonServerDescription desc = dir.getDescription(_idx); client.set(desc); client.bind(); serverName = desc.serverName; appName = desc.appName; if(serverName == ""){ serverName = "null"; } if(appName == ""){ appName = "null"; } } }