• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Using an NSOpenGLVIew to play a Quartz composition with QCRenderer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using an NSOpenGLVIew to play a Quartz composition with QCRenderer


  • Subject: Using an NSOpenGLVIew to play a Quartz composition with QCRenderer
  • From: Jonathan Selander <email@hidden>
  • Date: Thu, 15 Jan 2009 10:35:04 +0100

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 (email@hidden)

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:
This email sent to email@hidden


  • Prev by Date: Re: File association
  • Next by Date: Re: NSImage resizing
  • Previous by thread: Re: completely messed up with bindings...
  • Next by thread: Filtering NSPopUpButtonCell when clicking on it
  • Index(es):
    • Date
    • Thread