summaryrefslogtreecommitdiff
path: root/gui/src/ofApp.h
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/ofApp.h')
-rw-r--r--gui/src/ofApp.h30
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;
+
};