Send or receive openFrameworks textures to other applications which use DirectX and OpenGL with Spout
C++ C
Latest commit c3feb68 Apr 5, 2016 @elliotwoods Update README.md

README.md

ofxSpout

Thumbnail

Implementation of Spout v2 for sharing textures between applications (including DX and GL).

Tested with:

  • openFrameworks 0.9.0 at 3d2c9f2d25c4401274b70e5f68251fd459d8a894
  • Visual Studio 2015
  • 32bit and 64bit
  • Windows 8.1
  • Spout v2.004

Requirements:

Usage

Sending

class ofApp {
    ofxSpout::Sender sender;
}
void ofApp::setup() {
    sender.init("My Sender");
    //...
}

void ofApp::update() {
    sender.send(myTexture);
}

Receiving

class ofApp {
    ofxSpout::Receiver sender;
}
void ofApp::setup() {
    receiver.init();
    //...
}

void ofApp::update() {
    receiver.receive(myTexture);
}

Notes

Windows Vista

Due to the deprecated GetVersion function, I've hardcoded a true at https://github.com/elliotwoods/ofxSpout/blob/master/libs/SpoutSDK/src/SpoutDirectX.cpp#L540. If you are running on a version of windows which doesn't have DX11 (i.e. Vista or earlier), then you can either uncomment the function or change the literal to be false.