Exemplo n.º 1
0
void AppManager::setupOF()
{
    ofSetLogLevel(OF_LOG_NOTICE);
    ofSetFrameRate(24);
    ofSetVerticalSync(false);
    ofSetEscapeQuitsApp(true);
}
Exemplo n.º 2
0
void testApp::setup(){
	
	ofSetEscapeQuitsApp(false);
	ofEnableAlphaBlending();
	ofSetFrameRate(30);
	ofBackground(0);
	
    captureGui.setImageProvider( new ofxDepthImageProviderOpenNI() );
    captureGui.setup();
}
Exemplo n.º 3
0
//--------------------------------------------------------------
void testApp::setup(){
    
	ofSetEscapeQuitsApp(false);
#if defined(TARGET_WIN32) && !defined(OCULUS_RIFT)
	ofSetFrameRate(60);
#endif
	ofSetVerticalSync(true);
	ofBackground(0);
    
#if defined(OCULUS_RIFT) && defined(TARGET_WIN32)
//    ofSetWindowPosition(0,0);
//    ofSetWindowShape(1920*2,1080);
#else
	#ifdef CLOUDS_RELEASE
//    ofSetWindowPosition(1920 + 1920*.5,1080*.5);
//    ofSetWindowPosition(0,0);
	#endif
//    ofSetWindowShape(1920,1080);
#endif

    
#ifdef OCULUS_RIFT
    ofToggleFullscreen();
#else
    ofSetWindowShape(1280, 720);
    ofSetWindowPosition(ofGetScreenWidth()/2 - 1280/2, ofGetScreenHeight()/2 - 720/2);

#endif
    
#ifdef CLOUDS_RELEASE
	ofHideCursor();
    
    // Log to file instead of console.
    // Note that this only works with ofLog(...), not cout.
    if (!ofDirectory::doesDirectoryExist(GetCloudsDataPath(true) + "fml")) {
        ofDirectory::createDirectory(GetCloudsDataPath(true) + "fml");
    }
    ofLogToFile(GetCloudsDataPath(true) + "fml/log_" + ofGetTimestampString() + ".log");
#endif
    
	firstFrame = true;
	playerSetup = false;
	shouldSetupPlayer = false;
    
#ifdef OCULUS_RIFT
	loader.loadImage(GetCloudsDataPath() + "AppData/CLOUDS_HD_BG_DOUBLE.png");
#else
	loader.loadImage(GetCloudsDataPath() + "AppData/SCREEN_BG.png");
#endif


}
//--------------------------------------------------------------
void ofApp::setup() {


    ofSetEscapeQuitsApp(false);

    play.addListener(this, &ofApp::playPressed);
    learnPlay.addListener(this, &ofApp::playPressed);
    conductModeButton.addListener(this, &ofApp::conductModeSelected);
    learnModeButton.addListener(this, &ofApp::learnModeSelected);
    back.addListener(this, &ofApp::backPressed);
    learnBack.addListener(this, &ofApp::backPressed);

    // Main screen gui
    guiModeSelection.setup("", "settings.xml", screenWidth/2, screenHeight/2);
    //guiModeSelection.add(conductModeButton.setup("conduct", 50.0F, 50.0F));
    //guiModeSelection.add(learnModeButton.setup("learn", 50.0F, 50.0F));
    conductModeButton.setup("Conduct", 30.0F, 30.0F);
    conductModeButton.setPosition(ofPoint(screenWidth/2-15, screenHeight/2-15));
    learnModeButton.setup("Learn", 30.0F, 30.0F);
    learnModeButton.setPosition(ofPoint(screenWidth / 2 - 15, screenHeight / 2 + 15));

    // Conduct mode gui
    //gui.setup();
    gui.setup("", "settings.xml", 50.0F, 50.0F);
    gui.add(play.setup("play"));
    gui.add(volume.setup("volume", 1.0, 0.0, 1.0));
    gui.add(speed.setup("tempo", 1.0, 0.5, 2.0));
    gui.add(background.setup("background", 0, 0, 8));
    gui.add(instruments.setup("instruments", -1, -1, 11));
    gui.add(back.setup("back"));

    // Learn mode gui

    learnGui.setup("", "settings.xml", 50.0F, 500.0F);
    learnGui.add(learnPlay.setup("play"));
    learnGui.add(learnVolume.setup("volume", 1.0, 0.0, 1.0));
    learnGui.add(learnSpeed.setup("tempo", 1.0, 0.5, 2.0));
    learnGui.add(learnBackground.setup("background", 0, 0, 8));
    learnGui.add(learnPattern.setup("pattern", 1, 1, 3));
    learnGui.add(learnBack.setup("back"));

    finalVideo = new unsigned char[1440 * 1080 * 3];
    finalTexture.allocate(1440, 1080, GL_RGB);

    readInputFiles();

    for (int i = 0; i < 12; i++) {
        showInstrumentsVect.push_back(1);
    }

}
Exemplo n.º 5
0
//--------------------------------------------------------------
void ofApp::setup(){
        
    // save temp file WITHIN app!
    ofSetWindowTitle("audioFrames");
    ofSetDataPathRoot("../Resources/data/");
    ofSetEscapeQuitsApp(false);
    
    ofBackground(0,0,0);
    recording=false;
    
    //AUDIO
    bufferSize = 1024;
    left.assign(bufferSize, 0.0);
    right.assign(bufferSize, 0.0);
    volHistory.assign(400, 0.0);
    
    bufferCounter	= 0;
    drawCounter		= 0;
    smoothedVol     = 0.0;
    scaledVol		= 0.0;
    ofSoundStreamSetup(0,NUM_CHANNELS,this, SAMPLE_RATE,BUFFER_SIZE,4);
    tempAudio = "temp.wav";
    
    recTimer = 0;
    recTimerEnd = 0;
    recFrameRate = 40;
    passFrameRate = recFrameRate;
    recFrames = 160;
    passFrames = recFrames;
    
    
    //GUI
    gui.setup("Settings"); // most of the time you don't need a name
    gui.add(frames.setup("  FRAMES TO REC", 5, 1, 100));
    gui.add(frameRate.setup("  FRAMES PER SEC", 25, 6, 60));
    gui.add(recRecord.setup("[R]ECORD"));
    gui.add(recPlay.setup("[P]LAY"));
    gui.add(recLoop.setup("[L]OOP", false));
    gui.add(recExport.setup("[S]AVE"));
    recRecord.addListener(this,&ofApp::recRecordPressed);
    //recPlay.addListener(this,&ofApp::recPlayPressed);
    recExport.addListener(this,&ofApp::recExportPressed);
    
    //AUDIO
    audioAmp = 1000.00;
    soundStream.listDevices();
    soundStream.setup(this, 0, 2, 44100, bufferSize, 4);
    
    ofHideCursor();
    
}
Exemplo n.º 6
0
//--------------------------------------------------------------
void ofApp::setup(){

    ofSetVerticalSync(true);
    ofSetFrameRate(30);
    ofBackground(.15*255);
    ofEnableAlphaBlending();
    ofEnableSmoothing();
	ofSetEscapeQuitsApp(false);

	controller.setup();
	#ifdef TARGET_OSX
	RemoveCocoaMenusFromGlut("Duration");
	#endif
}
Exemplo n.º 7
0
//--------------------------------------------------------------
void testApp::setup(){
	
	ofSetEscapeQuitsApp(false);
	ofEnableAlphaBlending();
	ofSetFrameRate(60);
	ofBackground(0);
#ifdef FREENECT
    gui.setImageProvider( new ofxDepthImageProviderFreenect() );
#else
	gui.setImageProvider( new ofxDepthImageProviderOpenNI() );
#endif
	
	gui.setup();
}
Exemplo n.º 8
0
//--------------------------------------------------------------
void ofApp::setup(){        
    
    ofSetEscapeQuitsApp(false);
    ofSetVerticalSync(true);
//    ofEnableSmoothing();

    network.setup();
    network.setShapePtr(vsyn.ag_shapes);
    
    vsyn.initWindowSize();
    vsyn.setup();

    network.setup();

    
}
Exemplo n.º 9
0
//--------------------------------------------------------------
void testApp::setup(){
    
//    int windowMode = ofGetWindowMode();  
//    if(windowMode == OF_FULLSCREEN){  
//        this->windowWidth = ofGetScreenWidth();  
//        this->windowHeight = ofGetScreenHeight();
//    }
    ofSetFullscreen(true);
    
    desk.resX=backg.resX=curs.resX=slit.resX=errorBall.resX=blueScreen.resX=internet.resX=menu.resX=glitch.resX = ofGetScreenWidth();
    desk.resY=backg.resY=curs.resY=slit.resY=errorBall.resY=blueScreen.resY=internet.resY=menu.resY=glitch.resY = ofGetScreenHeight();

    
    menu.setup("Menu Bar"); // most of the time you don't need a name
    menu.add(finder.setup("GlitchOS", true));
//    menu.add(file.setup("Time", false));
//    menu.add(lol.setup("Truth", false));
//    menu.add(chicken.setup("Hearts", false));
    glitch.setup();
    desk.setup();
    desk.add(webcam.setup("icons/webcam.png", "Webcam"));
    desk.add(windows.setup("icons/windows.png", "Windows"));
    desk.add(safari.setup("icons/chrome.png", "Internet"));
//    desk.add(quickTime.setup("icons/video.png", "Video Player"));
    backg.setup("screen/background.jpg");
    curs.setup("screen/cursor.png");
    slit.setup(6, 20);
    errorBall.setup();
    blueScreen.setup();
    internet.setup();
        
    ofNoFill();
    ofEnableAlphaBlending();
    ofSetEscapeQuitsApp(false);
//    ofHideCursor();
    CGDisplayHideCursor(NULL);
    ofSetVerticalSync(true);
    ofSetFrameRate(60);
    
    slitIR = false;
    blueScreenIR = false;
    internetIR = false;
    quickVideoIR = false;

}
Exemplo n.º 10
0
//--------------------------------------------------------------
void testApp::setup() {

    //Basic initialization of all components
    Tweenzor::init( ) ;
    
	ofBackground(255 );
	ofSetFrameRate(60);
	ofSetVerticalSync(true);
	ofSetEscapeQuitsApp(false);
    
    ofSetWindowTitle( "ofxOpenVJ Example" ) ; 
	ofEnableSmoothing();
	ofEnableAlphaBlending();
    
    ofSetSmoothLighting(true);
    
    //ofSetLogLevel(OF_LOG_SILENT);
    ofSetLogLevel(OF_LOG_WARNING ) ;
	
    int bufferSize = 512;
	ofSoundStreamSetup(0, 1, this, 44100, bufferSize, 4);
    
    set.initKinectV1( );
    set.setup() ;


    //set.addScene( new ColorOutlineScene((int)set.getNumScenes(), "ColorOutlineScene" ) ) ;
    set.addScene( new RippleTunnelScene((int)set.getNumScenes(), "RippleTunnelScene" ) ) ;
    set.addScene( new TriangleKinectScene((int)set.getNumScenes(), "TriangleKinectScene" ) ) ;
    set.addScene( new SimplePointCloudScene((int)set.getNumScenes(), "SimplePointCloudScene" ) ) ;
    set.addScene( new SimpleOpenCVScene((int)set.getNumScenes(), "SimpleOpenCVScene" ) ) ;
    set.addScene( new SimpleMaskScene((int)set.getNumScenes(), "SimpleMaskScene" ) ) ;
    set.addScene( new TronLines( (int)set.getNumScenes(), "TronLines" ) ) ;
    set.initialize() ; 
    
}
Exemplo n.º 11
0
//--------------------------------------------------------------
void ofApp::setup(){
    ofSetWindowTitle("LightEchoes Generative Frame Test");
    ofSetFrameRate(60);
    ofSetLogLevel(OF_LOG_VERBOSE);
    ofBackground(50);
    ofSetEscapeQuitsApp(false);
    
    bAutoAdvance = false;
    frame.setup();
    
    frameRate = 60;
    
    Poco::Path path = Poco::Path::home();
    path.pushDirectory("Dropbox");
    path.pushDirectory("LE Shared");
    path.pushDirectory("Frames02");
    outputPath = path.toString();
    ofDirectory::createDirectory(outputPath, false, true);
    
    
    index = 0;
    frame.generate(index);
    incrementAt = ofGetElapsedTimef()+(1/frameRate);
}
Exemplo n.º 12
0
//--------------------------------------------------------------
void testApp::setup(){
	
	ofSetFrameRate(24);
	ofBackground(255*.1);
	ofSetVerticalSync(true);
	ofSetEscapeQuitsApp(false);
	
	glEnable(GL_LINE_SMOOTH);
	glEnable(GL_POINT_SMOOTH);

	ofToggleFullscreen();
	rendering = false;
	
	cam.setup();
	cam.autosavePosition = true;
	cam.loadCameraPosition();
	gui.setup("gui");
	
	gui.add(seed.setup("seed", ofxParameter<int>(), 0, 100));
	gui.add(heroNodes.setup("hero nodes", ofxParameter<int>(), 5, 20));
	gui.add(heroRadius.setup("spawn radius", ofxParameter<float>(), 5, 1000));
	gui.add(heroRadiusVariance.setup("radius var", ofxParameter<float>(), 5, 1000));
	gui.add(numIterations.setup("num iterations", ofxParameter<int>(), 1, 20));
	gui.add(numBranches.setup("num branches", ofxParameter<int>(), 1, 20));
	gui.add(numSurvivingBranches.setup("surviving branches", ofxParameter<int>(), 1, 10));
	gui.add(minDistance.setup("min branch dist", ofxParameter<float>(), 10, 1000));
	gui.add(distanceRange.setup("branch dist rng", ofxParameter<float>(), 0, 3.0));
	gui.add(stepSize.setup("step size", ofxParameter<float>(), 1, 300));
	gui.add(replicatePointSize.setup("replicate point size",ofxParameter<float>(), 1, 50));

	gui.add(lineThickness.setup("line thickness", ofxParameter<float>(), 1, 10));
	gui.add(lineAlpha.setup("line alpha", ofxParameter<float>(), 0, 1.0));
	
	gui.add(minAttractRadius.setup("min attract radius", ofxParameter<float>(), 10, 1000));
	gui.add(minRepelRadius.setup("min repel radius", ofxParameter<float>(), 0, 1000));
	gui.add(minFuseRadius.setup("min fuse radius", ofxParameter<float>(), 1, 100));
	
	gui.add(maxAttractForce.setup("max attract force", ofxParameter<float>(), 0, 1.0));
	gui.add(maxRepelForce.setup("max repel force", ofxParameter<float>(), 0, 1.0));

	gui.add(maxTraverseAngle.setup("max traverse angle", ofxParameter<float>(), 0, 180));
	gui.add(nodePopLength.setup("node pop length", ofxParameter<int>(), 50, 2000));
	gui.add(lineBlurAmount.setup("line blur amount", ofxParameter<float>(), 0, 10));
	gui.add(lineBlurFade.setup("line blur fade", ofxParameter<float>(), 0, 1.0));
	
	gui.add(lineStartTime.setup("line start", ofxParameter<float>(), 0, 1.0));
	gui.add(lineEndTime.setup("line end", ofxParameter<float>(), 0, 1.0));
	gui.add(lineFadeVerts.setup("line fade verts", ofxParameter<int>(), 1, 10));

	gui.loadFromFile("settings.xml");
	
	timeline.setup();

	timeline.setFrameRate(24);
	timeline.setFrameBased(true);
	timeline.setDurationInFrames(30*24);
	timeline.addTrack("camera", &camTrack);
	timeline.addCurves("node bounce");
	timeline.addCurves("cluster node size", ofRange(1, 10), 2);
	timeline.addCurves("traversed node size", ofRange(1, 10), 2);
	timeline.addCurves("line focal dist", ofRange(0, sqrt(3000)),  100);
	timeline.addCurves("line focal range", ofRange(0, sqrt(3000)),  100);
	timeline.addCurves("line width", ofRange(.5, 2.0),  100);
	timeline.addCurves("line dissolve");
	lineColor = timeline.addColors("line color");
	timeline.addColorsWithPalette("node color", "nerve_palette.png");
	//timeline.addColors("node color");
	timeline.setMinimalHeaders(true);

	camTrack.setCamera(cam);

	renderTarget.allocate(1920, 1080, GL_RGB, 4);
	lineBlurTarget.allocate(1920, 1080, GL_RGB, 4);
	
	traversedNodePoints.setUsage( GL_DYNAMIC_DRAW );
	traversedNodePoints.setMode(OF_PRIMITIVE_POINTS);

	nodeCloudPoints.enableNormals();
	loadShader();
	
}
Exemplo n.º 13
0
Arquivo: main.cpp Projeto: M0ssy/cyril
int main( ){
  // Set this temporarily to load font from packaged Resources
  ofSetDataPathRoot("../Resources/data");
  ofSetEscapeQuitsApp(false);
  
  colorNameMap["white"] = ofColor::white;
  colorNameMap["gray"] = ofColor::gray;
  colorNameMap["black"] = ofColor::black;
  colorNameMap["red"] = ofColor::red;
  colorNameMap["green"] = ofColor::green;
  colorNameMap["blue"] = ofColor::blue;
  colorNameMap["cyan"] = ofColor::cyan;
  colorNameMap["magenta"] = ofColor::magenta;
  colorNameMap["yellow"] = ofColor::yellow;
  colorNameMap["aliceBlue"] = ofColor::aliceBlue;
  colorNameMap["antiqueWhite"] = ofColor::antiqueWhite;
  colorNameMap["aqua"] = ofColor::aqua;
  colorNameMap["aquamarine"] = ofColor::aquamarine;
  colorNameMap["azure"] = ofColor::azure;
  colorNameMap["beige"] = ofColor::beige;
  colorNameMap["bisque"] = ofColor::bisque;
  colorNameMap["blanchedAlmond"] = ofColor::blanchedAlmond;
  colorNameMap["blueViolet"] = ofColor::blueViolet;
  colorNameMap["brown"] = ofColor::brown;
  colorNameMap["burlyWood"] = ofColor::burlyWood;
  colorNameMap["cadetBlue"] = ofColor::cadetBlue;
  colorNameMap["chartreuse"] = ofColor::chartreuse;
  colorNameMap["chocolate"] = ofColor::chocolate;
  colorNameMap["coral"] = ofColor::coral;
  colorNameMap["cornflowerBlue"] = ofColor::cornflowerBlue;
  colorNameMap["cornsilk"] = ofColor::cornsilk;
  colorNameMap["crimson"] = ofColor::crimson;
  colorNameMap["darkBlue"] = ofColor::darkBlue;
  colorNameMap["darkCyan"] = ofColor::darkCyan;
  colorNameMap["darkGoldenRod"] = ofColor::darkGoldenRod;
  colorNameMap["darkGray"] = ofColor::darkGray;
  colorNameMap["darkGrey"] = ofColor::darkGrey;
  colorNameMap["darkGreen"] = ofColor::darkGreen;
  colorNameMap["darkKhaki"] = ofColor::darkKhaki;
  colorNameMap["darkMagenta"] = ofColor::darkMagenta;
  colorNameMap["darkOliveGreen"] = ofColor::darkOliveGreen;
  colorNameMap["darkorange"] = ofColor::darkorange;
  colorNameMap["darkOrchid"] = ofColor::darkOrchid;
  colorNameMap["darkRed"] = ofColor::darkRed;
  colorNameMap["darkSalmon"] = ofColor::darkSalmon;
  colorNameMap["darkSeaGreen"] = ofColor::darkSeaGreen;
  colorNameMap["darkSlateBlue"] = ofColor::darkSlateBlue;
  colorNameMap["darkSlateGray"] = ofColor::darkSlateGray;
  colorNameMap["darkSlateGrey"] = ofColor::darkSlateGrey;
  colorNameMap["darkTurquoise"] = ofColor::darkTurquoise;
  colorNameMap["darkViolet"] = ofColor::darkViolet;
  colorNameMap["deepPink"] = ofColor::deepPink;
  colorNameMap["deepSkyBlue"] = ofColor::deepSkyBlue;
  colorNameMap["dimGray"] = ofColor::dimGray;
  colorNameMap["dimGrey"] = ofColor::dimGrey;
  colorNameMap["dodgerBlue"] = ofColor::dodgerBlue;
  colorNameMap["fireBrick"] = ofColor::fireBrick;
  colorNameMap["floralWhite"] = ofColor::floralWhite;
  colorNameMap["forestGreen"] = ofColor::forestGreen;
  colorNameMap["fuchsia"] = ofColor::fuchsia;
  colorNameMap["gainsboro"] = ofColor::gainsboro;
  colorNameMap["ghostWhite"] = ofColor::ghostWhite;
  colorNameMap["gold"] = ofColor::gold;
  colorNameMap["goldenRod"] = ofColor::goldenRod;
  colorNameMap["grey"] = ofColor::grey;
  colorNameMap["greenYellow"] = ofColor::greenYellow;
  colorNameMap["honeyDew"] = ofColor::honeyDew;
  colorNameMap["hotPink"] = ofColor::hotPink;
  colorNameMap["indianRed "] = ofColor::indianRed ;
  colorNameMap["indigo "] = ofColor::indigo ;
  colorNameMap["ivory"] = ofColor::ivory;
  colorNameMap["khaki"] = ofColor::khaki;
  colorNameMap["lavender"] = ofColor::lavender;
  colorNameMap["lavenderBlush"] = ofColor::lavenderBlush;
  colorNameMap["lawnGreen"] = ofColor::lawnGreen;
  colorNameMap["lemonChiffon"] = ofColor::lemonChiffon;
  colorNameMap["lightBlue"] = ofColor::lightBlue;
  colorNameMap["lightCoral"] = ofColor::lightCoral;
  colorNameMap["lightCyan"] = ofColor::lightCyan;
  colorNameMap["lightGoldenRodYellow"] = ofColor::lightGoldenRodYellow;
  colorNameMap["lightGray"] = ofColor::lightGray;
  colorNameMap["lightGrey"] = ofColor::lightGrey;
  colorNameMap["lightGreen"] = ofColor::lightGreen;
  colorNameMap["lightPink"] = ofColor::lightPink;
  colorNameMap["lightSalmon"] = ofColor::lightSalmon;
  colorNameMap["lightSeaGreen"] = ofColor::lightSeaGreen;
  colorNameMap["lightSkyBlue"] = ofColor::lightSkyBlue;
  colorNameMap["lightSlateGray"] = ofColor::lightSlateGray;
  colorNameMap["lightSlateGrey"] = ofColor::lightSlateGrey;
  colorNameMap["lightSteelBlue"] = ofColor::lightSteelBlue;
  colorNameMap["lightYellow"] = ofColor::lightYellow;
  colorNameMap["lime"] = ofColor::lime;
  colorNameMap["limeGreen"] = ofColor::limeGreen;
  colorNameMap["linen"] = ofColor::linen;
  colorNameMap["maroon"] = ofColor::maroon;
  colorNameMap["mediumAquaMarine"] = ofColor::mediumAquaMarine;
  colorNameMap["mediumBlue"] = ofColor::mediumBlue;
  colorNameMap["mediumOrchid"] = ofColor::mediumOrchid;
  colorNameMap["mediumPurple"] = ofColor::mediumPurple;
  colorNameMap["mediumSeaGreen"] = ofColor::mediumSeaGreen;
  colorNameMap["mediumSlateBlue"] = ofColor::mediumSlateBlue;
  colorNameMap["mediumSpringGreen"] = ofColor::mediumSpringGreen;
  colorNameMap["mediumTurquoise"] = ofColor::mediumTurquoise;
  colorNameMap["mediumVioletRed"] = ofColor::mediumVioletRed;
  colorNameMap["midnightBlue"] = ofColor::midnightBlue;
  colorNameMap["mintCream"] = ofColor::mintCream;
  colorNameMap["mistyRose"] = ofColor::mistyRose;
  colorNameMap["moccasin"] = ofColor::moccasin;
  colorNameMap["navajoWhite"] = ofColor::navajoWhite;
  colorNameMap["navy"] = ofColor::navy;
  colorNameMap["oldLace"] = ofColor::oldLace;
  colorNameMap["olive"] = ofColor::olive;
  colorNameMap["oliveDrab"] = ofColor::oliveDrab;
  colorNameMap["orange"] = ofColor::orange;
  colorNameMap["orangeRed"] = ofColor::orangeRed;
  colorNameMap["orchid"] = ofColor::orchid;
  colorNameMap["paleGoldenRod"] = ofColor::paleGoldenRod;
  colorNameMap["paleGreen"] = ofColor::paleGreen;
  colorNameMap["paleTurquoise"] = ofColor::paleTurquoise;
  colorNameMap["paleVioletRed"] = ofColor::paleVioletRed;
  colorNameMap["papayaWhip"] = ofColor::papayaWhip;
  colorNameMap["peachPuff"] = ofColor::peachPuff;
  colorNameMap["peru"] = ofColor::peru;
  colorNameMap["pink"] = ofColor::pink;
  colorNameMap["plum"] = ofColor::plum;
  colorNameMap["powderBlue"] = ofColor::powderBlue;
  colorNameMap["purple"] = ofColor::purple;
  colorNameMap["rosyBrown"] = ofColor::rosyBrown;
  colorNameMap["royalBlue"] = ofColor::royalBlue;
  colorNameMap["saddleBrown"] = ofColor::saddleBrown;
  colorNameMap["salmon"] = ofColor::salmon;
  colorNameMap["sandyBrown"] = ofColor::sandyBrown;
  colorNameMap["seaGreen"] = ofColor::seaGreen;
  colorNameMap["seaShell"] = ofColor::seaShell;
  colorNameMap["sienna"] = ofColor::sienna;
  colorNameMap["silver"] = ofColor::silver;
  colorNameMap["skyBlue"] = ofColor::skyBlue;
  colorNameMap["slateBlue"] = ofColor::slateBlue;
  colorNameMap["slateGray"] = ofColor::slateGray;
  colorNameMap["slateGrey"] = ofColor::slateGrey;
  colorNameMap["snow"] = ofColor::snow;
  colorNameMap["springGreen"] = ofColor::springGreen;
  colorNameMap["steelBlue"] = ofColor::steelBlue;
  colorNameMap["tan"] = ofColor::tan;
  colorNameMap["teal"] = ofColor::teal;
  colorNameMap["thistle"] = ofColor::thistle;
  colorNameMap["tomato"] = ofColor::tomato;
  colorNameMap["turquoise"] = ofColor::turquoise;
  colorNameMap["violet"] = ofColor::violet;
  colorNameMap["wheat"] = ofColor::wheat;
  colorNameMap["whiteSmoke"] = ofColor::whiteSmoke;
  colorNameMap["yellowGreen"] = ofColor::yellowGreen;
  
  int X_MAX = 640;
  int Y_MAX = 480;
  //int X_MAX = 2048;
  //int Y_MAX = 768;
  ofSetupOpenGL(X_MAX, Y_MAX, OF_WINDOW);
  
	ofRunApp(new cyrilApp());
}
Exemplo n.º 14
0
//--------------------------------------------------------------
void ofApp::setup()
{
    doSwapCameras = false;
    ofSetEscapeQuitsApp(false);
    ofSetLogLevel(OF_LOG_VERBOSE);
    ofSetLogLevel("ofThread", OF_LOG_SILENT);
    doDrawDebug = false;
    
    //options for testing locally
    //see also OpenCVEngine::setup to force movie
    disableFadeCandies = false;
    bool skipRPiReboot = false;
    
    // if SKIPRPIREBOOT env is set, don't reboot Pis (used by poll_installation.sh cronjob)
    char* rebootEnv;
    rebootEnv = getenv("SKIPRPIREBOOT");
    if (rebootEnv!=NULL) {
        ofLogNotice() << "found SKIPRPIREBOOT env variable, not rebooting RPis";
        skipRPiReboot = true;
    }
    
    startupController.setup(skipRPiReboot);
    colorSchemes.setup();
    
    ofBackground(ofColor::black);

    fbo.allocate(480, 120, GL_RGBA, 4);
    fbo.begin();
        ofClear(0, 0, 0, 0);
    fbo.end();
    
    FluidDynamicsApp* fluidDynamicsApp = new FluidDynamicsApp();
    fluidDynamicsApp->name = "FluidDynamicsApp";
    fluidDynamicsApp->setup(&fbo);
    wallApps.push_back(fluidDynamicsApp);
    
    ContourSillhouetteApp* contourSillhouetteApp = new ContourSillhouetteApp();
    contourSillhouetteApp->name = "ContourSillhouetteApp";
    contourSillhouetteApp->setup(&fbo);
    wallApps.push_back(contourSillhouetteApp);
    
    FFTVisualizerApp* fftVisualizerApp = new FFTVisualizerApp();
    fftVisualizerApp->name = "FFTVisualizerApp";
    fftVisualizerApp->setup(&fbo);
    wallApps.push_back(fftVisualizerApp);
    
    OpenCVBurstApp* openCVBurstApp = new OpenCVBurstApp();
    openCVBurstApp->name = "OpenCVBurstApp";
    openCVBurstApp->setup(&fbo);
    wallApps.push_back(openCVBurstApp);
    
    OpenCVMinimalParticle* openCVMinimalParticle = new OpenCVMinimalParticle();
    openCVMinimalParticle->setup(&fbo);
    openCVMinimalParticle->name = "OpenCVMinimalParticle";
    wallApps.push_back(openCVMinimalParticle);
    
//    OpenCVParticleApp* openCVParticleApp = new OpenCVParticleApp();
//    openCVParticleApp->name = "OpenCVParticleApp";
//    openCVParticleApp->setup(&fbo);
//    wallApps.push_back(openCVParticleApp);
    
    VideoPlayerApp* videoPlayerApp = new VideoPlayerApp();
    videoPlayerApp->name = "VideoPlayerApp";
    videoPlayerApp->setup(&fbo);
    wallApps.push_back(videoPlayerApp);
    
#if 0
    PongApp* pongApp = new PongApp();
    pongApp->name = "PongApp";
    pongApp->setup(&fbo);
    wallApps.push_back(pongApp);
#endif

    currentWallAppIndex = 0;
    currentApp = wallApps[currentWallAppIndex];
    float aspect = currentApp->getWidth() / currentApp->getHeight();
    ofSetWindowShape(ofGetScreenWidth() / 2, (ofGetScreenWidth() / 2) / aspect);
    ofEnableAlphaBlending();
    
    hasStartedFadeCandy = false;
    
    sceneChanger.setup();
    ofAddListener(sceneChanger.sceneChangeEvent, this, &ofApp::onRPiSceneChangeButtonPress);
}
Exemplo n.º 15
0
//--------------------------------------------------------------
void gamuzaMain::setup(){

	flagSystemLoaded	= false; // first line of gamuza setup

	//////////////////////////////////////////////
	// load settings from xml
	loadGamuzaSettings();
	// automation
    isFullscreen = false;
	if(autoPilot){
		gamuzaFullscreen();
	}
	//////////////////////////////////////////////

	//////////////////////////////////////////////
	// init general openframeworks settings
    ofSetEscapeQuitsApp(false);
	ofSetFrameRate(200);
	ofEnableSmoothing();
	ofSetLogLevel(OF_LOG_VERBOSE);
	//////////////////////////////////////////////

    //////////////////////////////////////////////
	// OSC data sending @ host_number(IP),host_port
    gamuzaSetup.lock();
    setupOSC();
    gamuzaSetup.unlock();
	//////////////////////////////////////////////

	//////////////////////////////////////////////
	// AUDIO
	if(audioActivated){
		gamuzaSetup.lock();
		setupAudio();
		gamuzaSetup.unlock();
	}
	//////////////////////////////////////////////

    //////////////////////////////////////////////
	// MIDI
    gamuzaSetup.lock();
    setupMidi();
    gamuzaSetup.unlock();
    //////////////////////////////////////////////

	//////////////////////////////////////////////
	// OPENNI
	if(openniActivated){
		gamuzaSetup.lock();
		sensorKinect.setupDevice(workingW,workingH,useKinectInfrared,sensorKinectLedState);
		gamuzaSetup.unlock();
	}
	//////////////////////////////////////////////

	//////////////////////////////////////////////
	// FBO second screen output texture
	gamuzaSetup.lock();
	setupFBO();
	gamuzaSetup.unlock();
	//////////////////////////////////////////////

	//////////////////////////////////////////////
	// ARDUINO
	if(arduinoActivated){
		gamuzaSetup.lock();
		setupArduino();
		gamuzaSetup.unlock();
	}
	//////////////////////////////////////////////

	//////////////////////////////////////////////
	// GUI
	// include setup of webcams & audio inputs
	gamuzaSetup.lock();
    setupSettingPanel();
	setupGui();
	gamuzaSetup.unlock();
	//////////////////////////////////////////////

	//////////////////////////////////////////////
	// SYSTEM
	currentSavedFrame   = 0;
    gaFrameCounter      = 0;
    //////////////////////////////////////////////

	//////////////////////////////////////////////
	// set log level to error only
	ofSetLogLevel(OF_LOG_ERROR);
    sendPrivateMessage(GAMUZA_CONSOLE_LOG, " ");
	//////////////////////////////////////////////

}
Exemplo n.º 16
0
//--------------------------------------------------------------
void ofApp::setup(){
	//ofRegisterTouchEvents(this);
	ofSetEscapeQuitsApp(false);	
}