ofFBO to ofxSyphon server texture.

I’ve trying to send an ofFBO image using ofxSyphon to another application. ofxSyphonServer.h has the following

void publishScreen();  
void publishTexture(ofTexture* inputTexture);  

But I haven’t been able to use the ofFBO with something like myFBO.getTextureReference() or something:

individualTextureSyphonServer.publishTexture(myFBO.getTextureReference() );  

I think I’m confused with the pointers, anyway… any help would be awesome! :smiley:

hi irregular,


individualTextureSyphonServer.publishTexture( & myFBO.getTextureReference() );  


I get so confused with pointers but this was far more simple than I thought. :smiley:
Thank you damian. :wink:

Hey wait. It worked perfectly but I’m curious… is this a pointer to a pointer for a texture?

 & myFBO.getTextureReference()   

mm, not really. a reference behaves like a pointer, but it uses the same syntax as though it is a regular object.

ofImage image;  
ofImage &referenceToImage = image;  
image.draw( 10, 10 ); // draws myImage at 10,10  
referenceToImage.draw( 100, 10 ); // draws nothing as we cleared the image  

Thank you for the reply. :smiley:
Something new to learn.