3 changed files with 61 additions and 0 deletions
@ -0,0 +1,7 @@ |
|||||
|
#include "ofMain.h" |
||||
|
#include "ofApp.h" |
||||
|
|
||||
|
int main(){ |
||||
|
ofSetupOpenGL(800, 450, OF_WINDOW); |
||||
|
ofRunApp(new ofApp()); |
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
#include "ofApp.h" |
||||
|
|
||||
|
void ofApp::setup(){ |
||||
|
ofBackground(0); |
||||
|
piMapper.setup(); |
||||
|
} |
||||
|
|
||||
|
void ofApp::update(){ |
||||
|
piMapper.update(); |
||||
|
} |
||||
|
|
||||
|
void ofApp::draw(){ |
||||
|
piMapper.draw(); |
||||
|
} |
||||
|
|
||||
|
void ofApp::keyPressed(int key){ |
||||
|
piMapper.keyPressed(key); |
||||
|
} |
||||
|
|
||||
|
void ofApp::keyReleased(int key){ |
||||
|
piMapper.keyReleased(key); |
||||
|
} |
||||
|
|
||||
|
void ofApp::mousePressed(int x, int y, int button){ |
||||
|
piMapper.mousePressed(x, y, button); |
||||
|
} |
||||
|
|
||||
|
void ofApp::mouseReleased(int x, int y, int button){ |
||||
|
piMapper.mouseReleased(x, y, button); |
||||
|
} |
||||
|
|
||||
|
void ofApp::mouseDragged(int x, int y, int button){ |
||||
|
piMapper.mouseDragged(x, y, button); |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include "ofMain.h" |
||||
|
#include "ofxPiMapper.h" |
||||
|
|
||||
|
class ofApp : public ofBaseApp { |
||||
|
public: |
||||
|
void setup(); |
||||
|
void update(); |
||||
|
void draw(); |
||||
|
|
||||
|
void keyPressed(int key); |
||||
|
void keyReleased(int key); |
||||
|
|
||||
|
void mousePressed(int x, int y, int button); |
||||
|
void mouseReleased(int x, int y, int button); |
||||
|
void mouseDragged(int x, int y, int button); |
||||
|
|
||||
|
ofxPiMapper piMapper; |
||||
|
}; |
Loading…
Reference in new issue