From 0e436679aa8c09a08e20849f204c969eb2d875b8 Mon Sep 17 00:00:00 2001 From: Comment Date: Wed, 26 Feb 2014 10:57:16 +0000 Subject: initial commit --- basedProject/src/ofApp.cpp | 176 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 basedProject/src/ofApp.cpp (limited to 'basedProject/src/ofApp.cpp') diff --git a/basedProject/src/ofApp.cpp b/basedProject/src/ofApp.cpp new file mode 100644 index 0000000..0dc6b46 --- /dev/null +++ b/basedProject/src/ofApp.cpp @@ -0,0 +1,176 @@ +#include "ofApp.h" +//-------------------------------------------------------------- +ofApp::~ofApp(){ + saveSettings("settings.xml"); +} + +//-------------------------------------------------------------- +void ofApp::setup() { + loadSettings("settings.xml"); + + ofBackground(0,0,0); + + ///ofSetVerticalSync(true); + + //some model / light stuff + glEnable (GL_DEPTH_TEST); + glShadeModel (GL_SMOOTH); + glColorMaterial (GL_FRONT_AND_BACK, GL_DIFFUSE); + glEnable (GL_COLOR_MATERIAL); + + ofDisableLighting(); + ofSetGlobalAmbientColor(ofColor(255,255,255)); + + fullscreen=false; + activeView=0; + + xhair.loadImage("crosshairs.png"); +} + +//-------------------------------------------------------------- +void ofApp::update() { + ofSetWindowTitle(ofToString(ofGetFrameRate())); +} + +//-------------------------------------------------------------- +void ofApp::draw() { + + for (int i=0;i': + //nextMovie(); + break; + case '/': + //light=!light; + //printf(light?"LIGHT ON\n":"LIGHT OFF\n"); + break; + } +} + +void ofApp::keyReleased(int key){ + if (activeView<0) for (int i=0;ikeys; + XML.getAttributeNames("settings", keys, 0); + mapsettings; + for (int k=0;kkeys; + XML.getAttributeNames("settings", keys, 0); + for (int k=0;k