Browse Source

Add `ofxPiMapper::loadXmlSettings()` method.

master
Krisjanis Rijnieks 10 years ago
parent
commit
a3e2f621d7
  1. 15
      src/ofxPiMapper.cpp
  2. 1
      src/ofxPiMapper.h

15
src/ofxPiMapper.cpp

@ -59,6 +59,21 @@ void ofxPiMapper::registerFboSource(ofx::piMapper::FboSource & fboSource){
mediaServer.addFboSource(fboSource);
}
bool ofxPiMapper::loadXmlSettings(string fileName){
/*
if(surfaceManager == 0){
ofLogNotice("ofxPiMapper::loadXmlSettings()") << "Could not load XML settings as the surfaceManager is not initialized yet.";
return;
}
*/
if(!ofFile::doesFileExist(fileName)){
ofLogNotice("ofxPiMapper::loadXmlSettings()") << "Settings file does not exist.";
return false;
}
surfaceManager.loadXmlSettings(fileName);
return true;
}
void ofxPiMapper::addTriangleSurface(){
int surfaceType = ofx::piMapper::SurfaceType::TRIANGLE_SURFACE;

1
src/ofxPiMapper.h

@ -27,6 +27,7 @@ class ofxPiMapper {
void setup();
void draw();
void registerFboSource(ofx::piMapper::FboSource & fboSource);
bool loadXmlSettings(string fileName);
void addTriangleSurface();
void addQuadSurface();
void showInfo(){

Loading…
Cancel
Save