Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Quartz Composer/Core Video broken for me in Leopard



Hi there,

I've just upgraded to Leopard and find that some CoreVideo integration that I'm doing with Quartz Composer is not working now. Things were all fine for Tiger. :-)

When it comes to rendering here's what I start with:

CVReturn returnVal = CVOpenGLBufferAttach
coreVideoBufferP,
reinterpret_cast<CGLContextObj>([secondFullScreenOpenGLContext CGLContextObj]),
0,    
0,    
0
);
NSAssert(returnVal == kCVReturnSuccess, @"CVOpenGLBufferAttach failed");

            

[secondFullScreenOpenGLContext makeCurrentContext];

I then render my GL world and:

glFlush();
[secondFullScreenOpenGLContext clearDrawable];

After that I call upon Quartz Composer:

// Set up our world image input with our CV buffer
[qcRenderer setValue:(id)coreVideoBufferP forInputKey:@"World_Image"];

            

//Render a frame
[qcRenderer renderAtTime:theCurrentTime arguments:0];

            

//Flush the OpenGL context to display the frame on screen
[fullScreenOpenGLContext flushBuffer];

Here's how I create my CV context:

NSAssert(fullScreenGLPixelFormat, @"!fullScreenGLPixelFormat");


secondFullScreenOpenGLContext = [[NSOpenGLContext alloc
initWithFormat:fullScreenGLPixelFormat
shareContext:viewOpenGLContext];
if (secondFullScreenOpenGLContext) {
float theUserSpaceScaleFactor = 1.0;
float theScreenWidth = static_cast<float>(CGDisplayPixelsWide(
displayIDs[displayIDIndex])) * theUserSpaceScaleFactor;
float theScreenHeight = static_cast<float>(CGDisplayPixelsHigh(
displayIDs[displayIDIndex])) * theUserSpaceScaleFactor;

NSAssert(coreVideoBufferP == 0, @"coreVideoBufferP != 0");
CVReturn theReturnVal = CVOpenGLBufferCreate(    
0,    
theScreenWidth,    
theScreenHeight,    
0,    
&coreVideoBufferP
);
 NSAssert(theReturnVal == kCVReturnSuccess && coreVideoBufferP
@"!(returnVal == kCVReturnSuccess && coreVideoBuffer)");

}

Any hints on what may have changed in Leopard with regards to Core Video/Quartz Composer? Could this even be a resolution independence thing somehow?

Cheers,
-C
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.