openframeworks addon for ArtNet
Note: This addon is seperate from the old version which uses libartnet.
In case you still need the old version, please checkout the legacy branch.
ofxArtnet allows the sending and recieving of Art-Net data within OpenFrameworks.
Sending simple data over ArtNet.
ofFbo sendData;
ofxArtnetSender artnet;
string targetIp = "127.0.0.1";
int width = 170;
int height = 1;
int internalformat = GL_RGB;
sendData.allocate(width, height, internalformat);
artnet.setup(targetIP);
sendData.begin();
ofClear(0);
ofSetColor(color);
ofDrawRectangle(0, 0, sendData.getWidth(), 1);
sendData.end();
// Convert the frame buffer to ofPixels
ofPixels data;
sendData.readToPixels(data);
// Send the pixel data over Artnet
artnet.sendArtnet(data);