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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to