#include "testApp.h" //-------------------------------------------------------------- testApp::~testApp(){ saveSettings("settings.xml"); } //-------------------------------------------------------------- void testApp::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); printf("loading %s at %f,%f,%f",model_name.c_str(),model_x,model_y,model_z); //load the bottle model - the 3ds and the texture file need to be in the same folder model.loadModel(model_name, 1); model.setRotation(0, 180, 1, 0, 0); //model.setRotation(0, 90, 0, 1, 0); model.setPosition(model_x, model_y, model_z); //ofDisableArbTex(); mode=DISPLAY; whichClip=0; texture.loadMovie(clips[whichClip]); texture.setLoopState(OF_LOOP_NORMAL); texture.play(); light=true; } //-------------------------------------------------------------- void testApp::update(){ texture.idleMovie(); } //-------------------------------------------------------------- void testApp::draw(){ for (int i=0;i': whichClip=(whichClip+1)%numClips; texture.stop(); texture.loadMovie(clips[whichClip]); texture.play(); break; case '/': light=!light; printf(light?"LIGHT ON\n":"LIGHT OFF\n"); break; } } //-------------------------------------------------------------- void testApp::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