We have set up a rendering framework based on Quartz Composer where
we use the image output generated by some compositions as inputs to
other compositions ,etc...
We have one object, let's call it ImageProducer, that maintains a
list of QCRenders and asks them to render their composition in a
specific OpenGL context. Then we arrach a CVOpenGLBufferRef (taken
from a pool, as in the Performer example) to the GLContext, call
glFlush and get our renderer image. This image, along with some
others calculated in parallel are then sent as inputs to the
QCRenderers of other ImageProducers, and so on.
We were hoping that dealing with CVOpenGLBufferRef would keep all
images in the Graphics Card memory and in order to get optimal
performances.
First results are quite promising with only a few producers, but
when we increase their number , we get a sudden drop of
performances from 60fps to 5fps.
You might be using too much VRAM at which point, data starts being
paged-out / paged-in from VRAM, which is pretty slow
In general you want to:
1) use a single CVOpenGLBufferPool
2) use two GL contexts (one for the display on screen and the other
one for drawing to the CVOpenGLBuffers)
3) draw into a CVOpenGLBuffer using this sequence: attach GL context,
call QCRenderer, flush, detach
4) OpenGL Driver Monitor in Performance Tools is the app you want to
monitor VRAM and what the GPU does
________________________________________________________
Pierre-Olivier Latour email@hidden
Quartz Composer Team Apple Computer, Inc.