Mailing Lists: Apple Mailing Lists

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

Re: Quartz Composer/Core Video broken for me in Leopard



- what do you mean "not working"?
- any error messages in the console log?
- if you compile your app on Tiger and run it on Leopard, does it work?

the Performer sample code in QC examples does work on Leopard and uses CVOpenGLBuffers too - have a look in case you're doing anything different?

On Oct 28, 2007, at 4:45 AM, Christopher Hunt wrote:

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

________________________________
Pierre-Olivier Latour - email@hidden
Technologist - Apple, Inc.



 _______________________________________________
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

References: 
 >Quartz Composer/Core Video broken for me in Leopard (From: Christopher Hunt <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.