hiroyuki / ofxArtnet

ultra simple artnet addon for openFrameworks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ofxArtnet

Join the chat at https://gitter.im/hiroyuki/ofxArtnet

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.

Overview

ofxArtnet allows the sending and recieving of Art-Net data within OpenFrameworks.

Basic Usage

Sending simple data over ArtNet.

Initialize an FBO and ArtNet Sender

ofFbo sendData;
ofxArtnetSender artnet;

Allocate the frame buffer and ArtNet sender

string targetIp = "127.0.0.1";
int width = 170;
int height = 1;
int internalformat = GL_RGB;
sendData.allocate(width, height, internalformat);
artnet.setup(targetIP);

Draw to the frame buffer and send to artnet

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);

Documentation

See Wiki for Documentation

Examples

Dependencies

ofxNetwork

About

ultra simple artnet addon for openFrameworks

License:MIT License


Languages

Language:C++ 98.8%Language:C 1.2%