Bug in QCRenderer ...?
Bug in QCRenderer ...?
- Subject: Bug in QCRenderer ...?
- From: Anshul jain <email@hidden>
- Date: Thu, 5 Feb 2009 14:59:31 +0530
I am trying to Render a Composition in CAOpenGLLayer using QCRenderer.
This is how i create QCRenderer
- (CGLContextObj)copyCGLContextForPixelFormat:
(CGLPixelFormatObj)pixelFormat
{
CGLContextObj object = [super
copyCGLContextForPixelFormat:pixelFormat];
NSString *path = [[NSBundle mainBundle] pathForResource:@"Blob"
ofType:@"qtz"];
QCComposition *aComposition = [QCComposition compositionWithFile:path];
CGColorSpaceRef colorRef =
CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
qcRenderer = [[QCRenderer alloc] initWithCGLContext:object
pixelFormat:pixelFormat colorSpace:colorRef composition:aComposition];
return object;
}
And this is how i display it...
- (BOOL)canDrawInCGLContext:(CGLContextObj)glContext pixelFormat:
(CGLPixelFormatObj)pixelFormat forLayerTime:
(CFTimeInterval)timeInterval displayTime:(const CVTimeStamp *)timeStamp
{
CGLSetCurrentContext(glContext);
_startTime = _startTime + (1.0f / 25.0f);
BOOL success = [qcRenderer renderAtTime:_startTime arguments:
[NSDictionary dictionary]];
if (texture)
CVOpenGLBufferRelease(texture);
texture = [qcRenderer createSnapshotImageOfType:@"CVOpenGLBuffer"];
if (success) {
if (texture)
return YES;
}
return NO;
}
then i display the texture in drawInCGLContext method.
But nothing get displays on the View.
I have debugged the Application and found out that
createSnapshotImageOfType: returns NULL.
but renderAtTime: return true. Is this the Bug or i am going some
where wrong.
Thanks!
Anshul
_______________________________________________
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