From 809dbfb4e437c5c991d8ed4d9b8c097ac95abda9 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Thu, 31 Aug 2017 12:43:03 +0100 Subject: prototype DMX control --- gui/src/ofApp.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'gui/src/ofApp.h') 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 map; + }; -- cgit v1.2.3