Last active
February 5, 2016 14:30
-
-
Save tgfrerer/f9fc6e3b2ebe88633ab5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ofMain.h" | |
#include "ofApp.h" | |
class ofApp : public ofBaseApp { | |
ofEventListener listener; | |
ofParameter<float> param; | |
public: | |
void setup() { | |
listener = param.newListener([=](float& arg) { | |
ofLogNotice() << arg; | |
}); | |
}; | |
void update() { | |
param = ofGetFrameNum(); | |
}; | |
void draw() {}; | |
}; | |
//======================================================================== | |
int main() { | |
ofSetupOpenGL(1024, 768, OF_WINDOW); // <-------- setup the GL context | |
// this kicks off the running of my app | |
// can be OF_WINDOW or OF_FULLSCREEN | |
// pass in width and height too: | |
ofRunApp(new ofApp()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment