Combining two oftextures

Hi,

I’m adapting ofxSyphon to make a combination of two syphon channels. I want to combine two ofTextures into one. One way to do that is loading the pixels, but I want to avoid that. I’m working on a resolution of 1080p resolution.

  
     mClient.bind();  
            individualTextureSyphonServer.publishTexture(&mClient.mTex );  
            mClient.unbind();  
  

Is there an other way to do this?

I still haven’t gotten around to using ofxSyphon but can you use shaders? There is a multiTextureShaderExample that might be a good start

That looks like a solution to my problem. According to the example it should be something like:

  
    fbo.begin();  
    ofClear(0, 0, 0,255);  
    shader.begin();  
     mClient.bind();  
     mClient2.bind();  
    // Pass the syphon1 texture  
    shader.setUniformTexture("tex0", mClient.mTex , 1 );  
    // Pass the syphon2 texture  
    shader.setUniformTexture("tex1", mClient2.mTex , 2 );  
  
  
       mClient.unbind();  
    mClient2.unbind();  
    shader.end();  
    fbo.end();  
  

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

I’ve committed everything to Github:

https://github.com/ikillbombs/syphonRouter/blob/Development/src/testApp.cpp