Hello again.

I am looking at the current included QCTV example code. I am curious about the multiple renderers. This leads me to believe I am misunderstanding something fundamental. Please indulge my few simple questions. :)

From the latest QCTV code I notice that there is an array of QCRenderers. I am looking at _reloadRenderers(), which calls

//Create QCRenderers from composition files
        while(_compositionNames[index] != nil) {
path = [bundle pathForResource:_compositionNames[index] ofType:@"qtz"]; renderer = [[QCRenderer alloc] initWithOpenGLContext:_glContext pixelFormat:_glPixelFormat file:path];
                if(renderer) {
                        [_settingsView addRenderer:renderer 
title:_compositionNames[index]];
                        [renderer release];
                }
                else
                NSLog(@"Failed loading composition \"[EMAIL PROTECTED]"", 
_compositionNames[index]);
                index += 1;
        }

This leads me to believe that each composition I have will require its own renderer? However, in QCTV, each patch loaded has a billboard or a sprite, or, in other words, is an 'output' patch. Does each and every composition, regardless of whether it is a final output (destination patch?) require its own QCRenderer? If I have a QC patch with has a valueForOutputKey of Type:"QTImage", , perhaps a patch with a CIKernal, etc, or a patch with a Render to Image, does it require its own QCRenderer?

Thanks yet again!

On Nov 16, 2007, at 8:17 PM, Troy Koelling wrote:

I can't think of anything specifically designed to show this in the examples, but maybe someone else will correct me with a perfect example :)

The old QCTV example would be a good place to start. It uses many compositions composited over eachother to display one unified display. Except that instead of compositing them together, you will want to instead get the
valueForOutputKey:"outputImage" ofType:"QCImage"
and then
setValueForInputKey:"inputImage"
on the next renderer.

Troy

On Nov 16, 2007, at 4:48 PM, vade wrote:

Hi Troy, thanks for the info.

I am indeed targeting 10.5 only. Is there any example code that I could take a look at?,Ive been toying with the Composition loader, but this also requires a bit of pre-knowldge as to what/how the patch(es) will be set up. Id like to handle this myself.

I am very glad to know this is possible!

Thanks again,



On Nov 16, 2007, at 5:36 PM, Troy Koelling wrote:

The Composition Loader patch was built for this within compositions. However, it seems you may not know ahead of time what the inputs might be and you are not afraid of code so that is possible too.

You can query a composition for its input and output keys, and you should be able to bridge the two together. If you are using Leopard, make sure to use the QCImage type when passing images. You cannot get any pixel data or display this opaque type, but it will be most optimal if the image is going right back into QC.

Troy

On Nov 16, 2007, at 2:07 PM, vade wrote:

Hello

I am in the process of writing a Cocoa application using QC. I have a folder full of "effects" (QC compositions) within my bundle which contain published image inputs and image outputs.

I would like to be able to procedurally connect one effect patch (the above QC comps) to another, and dyamically add and remove effects from a particular chain. (these may or may not adhere to a specific protocol, so lets assume im not dealing with consumer or provider style patches, just patches that have consistent published inputs and outputs).

Is there any reference/example code for connecting the input of one patch to the output of another, within cocoa?

I only need one QCView within my cocoa app, which contains a billboard (for example).

So, in short, how does one dynamically patch published inputs to other patches published outputs within Cocoa?

Thank you very much,

_______________________________________________
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/tkoelling%40apple.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