QC Context

Quartz Composer pixel formats and context handling

guitarflow's picture

Hey there guys,

we are trying to implement some sort of pipeline with custom QCPlugins and CIFilters within QC. It all worked out well at first but we ran into problems lately.

The main issue is that we don't know how the CGLContext operates in conjunction with pixel formats. We want that all our components are working on floating point buffers to get the maximum quality possible.

However, we don't understand how Quartz Composer handles the input and output image buffers/textures. It seems that regardless of how we set the output image, it gets scaled down to RGBA 8 bit per component.

So, to phrase a question: is there any way to tell QC that it should use RGBA floating point buffers? Are the input and output images converted to fit the pixel format QC expects?

Maybe someone can shed some light on this! It's really confusing. Especially as Apple is using the word "pixel format" in CGL and QCPlugIn with totally different meanings.

Thanks in advance!!

Flo

Rendering a CALayer to the QCPluginContext

dust's picture

Im hoping someone knows how to render a CALayer to a QCPluginContext or to the OpenGl cgl_ctx context ? It seems there is plenty of documentation in regards to rendering a QCView or QCComposition to a CA Layer. I thought contexts where interchangeable but I have tried rendering a CALayer to the QCPluginContext but it says non compatible context.

so i have tried this.

CARenderer* car;
 
car =[CARenderer rendererWithCGLContext:cgl_ctx options:arguments];
   car.layer = rootLayer;

also I have tried.

[rootLayer renderInContext:cgl_ctx;]

as well as a few other things like trying to render the CALayer to an image and bind that image to a GL quad etc... which i thought of as a temporary fix but i would like to be able to bind a CALayer right to the QCView not the QCView to layer. This way I can leverage the new emitters and what not in.

i would really like to get this plugin going so far I have 65 inputs, 700+ lines of code with no build errors or GFlog errors. So its pretty heavy with lots of fine controls.

google has not been my friend as on this one. any help would be greatly appreciated. there seems to be lack of documentation in these regards.