astellato / ofxSyphon

An OF add-on for using the Syphon framework.
Other
193 stars 57 forks source link

ofxSyphonClient getTexture not working without draw #44

Closed dimitre closed 5 years ago

dimitre commented 5 years ago

I took a while to discover, but getTexture actually is not allocated if I don't use draw command. I'm now using a draw to circumvent this.

syphonIn.draw(0,0,0,0);
ofTexture & tex = ui->pBool["syphon"] ? syphonIn.getTexture() : webcam.getTexture();

Thanks

bangnoise commented 5 years ago

Have you heeded the comment above getTexture()? ie you have to do:

syphonIn.bind();
ofTexture & tex = syphonIn.getTexture();
// use the texture here
syphonIn.unbind();
dimitre commented 5 years ago

Thank you @bangnoise