If the plugin is able to do its work on a GL texture then using 
lockTextureRep... and a texture provider will be much faster.

If you absolutely need access to the pixel data in memory, one faster approach 
is to use a texture and then do an asynchronous readback to an FBO, though 
generally this a) introduces one frame of lag and b) is a bit of extra coding.

Keeping the whole workflow in OpenGL is definitely the fastest way to do just 
about anything.


On 23 Feb 2010, at 14:34, Jens Uwe Michael Lange wrote:

> Hello,
> 
> currently I am writing a Custom QuartzComposer PlugIn that needs to read and 
> write 
> image data as fast as possible.
> 
> Starting from an example, I 've started to get my image data as follows:
> 
>               [self.inputImage 
> lockBufferRepresentationWithPixelFormat:QCPlugInPixelFormatRGBAf
>                colorSpace:[self.inputImage imageColorSpace] 
> forBounds:[self.inputImage imageBounds]];
> 
> then I am operating on the buffer writing the data on a seperate output 
> buffer from whom I generate a output provider
> by            
> 
> provider = [[context 
> outputImageProviderFromBufferWithPixelFormat:QCPlugInPixelFormatRGBAf         
>                                                                               
>      pixelsWide:width
>                                                                               
>                                            pixelsHigh:height
>                                                                               
>                                           baseAddress:outputBuffer 
>                                                                               
>                                           bytesPerRow:[self.inputImage 
> bufferBytesPerRow] 
>                                                                               
>                                   releaseCallback:_BufferReleaseCallback 
>                                                                               
>                                    releaseContext:NULL 
>                                                                               
>                                            colorSpace:[context colorSpace] 
>                                                                               
>                                  shouldColorMatch:YES] retain];
> 
> Now I am wondering, if this a efficient way, or if there are better ways to 
> do it.
> 
> Thanks for your help in advance,
> 
> JUM 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Quartzcomposer-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/quartzcomposer-dev/bangnoise%40gmail.com
> 
> This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to