[PD-dev] GEM passing output image later.

Gert De Roost paleajed at gmail.com
Wed Feb 29 02:06:18 CET 2012


For the pdp to GEM port of my freeframeGL host, I bump into a GEM
shortcoming...

When processing a pix image in a GEM external, the image is passed to the
processRGBAImage method.  You can access it during the length of the
function, after which I suppose, the imagestruct is automatically passed to
GEM for outputting.
What I want to do though, is outputting the image only when the next image
is being started to process.  I'll explain why: I do a call to
glReadPixels, which needs quite some time to finish, but by ussing Pixel
Buffer Objects, I can do this transmitting from GPU to CPU asynchronously,
so I can do stuff during the wait for glReadPixels to finish, then I can
copy the buffer into the output image.  Best is to wait for the next image,
which comes mostly more then 20ms later, so meanwhile the call can complete.
GEMs design doesnt facilitate outputting an image after the end of the
processing method though...  Is there some method internal to GEM that I
can use to directly send some data to the image outlet?  Or does anyone
have an idea how to wait for glReadPixels without at the same time blocking
the CPU?

I can be found scrutinizing some more GEM source code...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20120229/74c0fa3e/attachment.htm>


More information about the Pd-dev mailing list