diff options
| author | Tim Redfern <tim@getdrop.com> | 2017-08-31 12:43:03 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@getdrop.com> | 2017-08-31 12:43:03 +0100 |
| commit | 809dbfb4e437c5c991d8ed4d9b8c097ac95abda9 (patch) | |
| tree | 82e08c7cd6f61424ca65cd0174c62297b1daaa2a /gui/src/ofApp.h | |
| parent | 742e27767fd4208afe99ac42f243b88eef0ed7b3 (diff) | |
prototype DMX control
Diffstat (limited to 'gui/src/ofApp.h')
| -rw-r--r-- | gui/src/ofApp.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gui/src/ofApp.h b/gui/src/ofApp.h index ac6d850..6bb0c15 100644 --- a/gui/src/ofApp.h +++ b/gui/src/ofApp.h @@ -1,10 +1,37 @@ #pragma once #include "ofMain.h" +#include "ofxDmx.h" #include "chainImage.h" +class dmxMap{ + public: + dmxMap(){ + } + dmxMap(ofxDmx *_dmx,int _chan_R,int _chan_G,int _chan_B,int _x,int _y){ + dmx=_dmx; + chan_R=_chan_R; + chan_G=_chan_G; + chan_B=_chan_B; + x=_x; + y=_y; + } + void update(){ + unsigned char color[3]; + glReadPixels(x , ofGetHeight() - y , 1 , 1 , GL_RGB , GL_UNSIGNED_BYTE , color); + //printf("dmxMap %i,%i: colour %i %i %i\n",x,y,color[0],color[1],color[2]); + //dmx->setLevel(chan_R, R); + //dmx->setLevel(chan_G, G); + //dmx->setLevel(chan_B, B); + //dmx->update(); + } + int chan_R, chan_G, chan_B; + int x,y; + ofxDmx *dmx; +}; + class ofApp : public ofBaseApp{ public: @@ -31,4 +58,7 @@ class ofApp : public ofBaseApp{ chainImageSet images; + ofxDmx dmx; + vector<dmxMap> map; + }; |
