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::setup() { dir.getServerAnnouncedSignal()->connect(bind(&SyphonServerDirectoryApp::serverAnnounced, this, std::placeholders::_1)); dir.getServerRetiredSignal()->connect(bind(&SyphonServerDirectoryApp::serverRetired, this, std::placeholders::_1)); dir.setup(); client.setup(); serverName = "SyphonServerDirectory"; appName = "Example"; if(dir.size() > 0){ dirIdx = 0; setClient(dirIdx); } else { dirIdx = -1; } }