Hi,

I want to be able to use antialiasing with my qtz as well as being able to record frames, so I'm looking at ways to load the composition with a custom opengl context. Ive looked at the QCTV example a bit, and tried to make the first example on http://developer.apple.com/documentation/GraphicsImaging/Reference/QuartzFramework/Classes/QCRenderer_Class/Reference/Reference.html to work.

I basically copy/pasted the code and added an NSOpenGLView to my interface and connected it to a variable in my code, but when it's supposed to render, the opengl view stays blank. This is the code i use:


- (void) awakeFromNib
{
        NSOpenGLContext*     context = [renderView openGLContext];
        NSOpenGLPixelFormat*  format = [renderView pixelFormat];
NSString* path = [[NSBundle mainBundle] pathForResource:@"GreenScreen" ofType:@"qtz"];
        
        QCRenderer* myRenderer;
        // Create a Quartz Composer renderer.
        myRenderer = [[QCRenderer alloc] initWithOpenGLContext:context
                                                                                
           pixelFormat:format
                                                                                
                          file:path];
        
        // Render the first 10 seconds of the composition with steps of 1/25s.
        for (double t = 0.0; t <= 10.0; t += 1.0/25.0) {
                [myRenderer renderAtTime:t arguments:nil];
                [context flushBuffer]; //Required on double-buffered contexts
        }
        
        // Clean up
        [myRenderer release];
}

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to