GL Texture

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.