Depends on where you get your image from. If its coming from system memory (which it sounds like it is), you should check out apples 'Texture Range' GL example, and use Client Storage and only update your texture using glSubTexImage2D (plus you get dirty-rect-ing for free GPU side if you use that approach and know where the dirty rect is on your CPU side). If you can, also de-couple the texture upload from the client image generation code, and multithread your bitmap image creation. It will make a huge performance difference as if you wait even just a fraction too long to generate your bitmap, you will "miss" the opportunity to upload and draw your image during the current frame.

If you are doing work on the GPU, one thing I learnt to be careful of is color space conversions as they can be expensive. But without knowing what is happening in your plugin its hard to say :) How big is the texture/image you are working on, and on what hardware are you seeing that behavior?


On Jul 11, 2009, at 4:36 PM, Michal Antonic wrote:

Hi,
I made a QC plugin that changes its outputImage (@property(assign) id<QCPlugInOutputImageProvider> outputImage) port each frame.

This image is then used by Sprite patch as its input Image.

The whole composition is played by application that is basically the Quartz Composer Texture sample, except that it is capable of playing multiple compositions at once and uses Core Video Display Link.

The problem is, when playing more than 3 of these compositions with my custom plugin, the performance goes down and there is a frequent stutter.

This is from Instruments:
<Picture 11.jpg>


Apparently, 42.9% of the time is being spent in gleTextureImagePut function. I presume that the system isn't all too happy with changing multiple textures each frame or something...

How can I optimize this?

Thanks,
Miso _______________________________________________
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/doktorp%40mac.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