Reply To: float textures, cpu buffer support

Home Forums Syphon Syphon Development – Developer float textures, cpu buffer support Reply To: float textures, cpu buffer support

#5190
Andrea Cremaschi
Participant

@bangnoise: thanks for the code!

Actually, it does something different in respect of the one i posted: you are drawing in a -single- PBO, while the CVOpenGLBufferPool code manages -a pool- of frame buffers, using Core Video framework.
This helps when a new frame may be available in Syphon server before the old one has been entirely downloaded in CPU memory (i.e. in case of heavy GPU image manipulation retarding the frame download). This is also a bit more time consuming, since a new buffer must be attached to the openGL context for every new available Syphon image (ie the “CVOpenGLBufferAttach” method call). But with a slightly more complex code than the one I posted (in a multithread app), it is possible to avoid this delay, attaching the buffer as soon as the new Syphon image has been copied to the opengl buffer.

So, always speaking to the ones who want to copy syphon images to CPU memory: who just wants speed, doesn’t want to mess with multithreading and doesn’t need to do great image manipulation on the new Syphon image can go with the “opengl PBO method”. Who needs to do heavy GPU image manipulation, or need to process ALL the frames should go with the “CVOpenGLBufferPool method”..

ciao 🙂

ac