Skip to content

Instantly share code, notes, and snippets.

@tgfrerer
Last active February 5, 2016 14:30
Show Gist options
  • Save tgfrerer/f9fc6e3b2ebe88633ab5 to your computer and use it in GitHub Desktop.
Save tgfrerer/f9fc6e3b2ebe88633ab5 to your computer and use it in GitHub Desktop.
#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