I’m currently using ofImage.grabScreen to send a texture to ofxSyphon. I’m doing this on every update.
Using the Call Tree in Xcode Instruments, the glReadPixels that is called from grabScreen keeps the memory growing on every call. If you could, let me know if anything seems obvious in the code below…
I’m not sure about the leak but you can def grab the screen to texture not using an ofImage and it will save you alot on footprint / frame rate since you are reading back to pixels (everything stays in the graphics card). try the texture screengrab example in examples/gl if you need a reference.
the glReadPixels call is in libGL.dylib and that seems to call GeForceGL driver. At any rate, this problem looks like it might even be driver/hardware related. I’m on a macbook right now. who knows…
actually the fastest would be to use an fbo, draw to it, then pass the fbo texture to syphon that way there’s no transfer at all from the graphics card -> ram which would be slow.