Re: Rendering OpenGL in timed loop (CoreVideo).
Re: Rendering OpenGL in timed loop (CoreVideo).
- Subject: Re: Rendering OpenGL in timed loop (CoreVideo).
- From: Brian Bruinewoud <email@hidden>
- Date: Sat, 11 Apr 2009 11:56:42 +1000
Note that this thread is stopping on the line:
GLint e = glGetError();
And that getFrameForTime looks like this:
- (CVReturn)getFrameForTime:(const CVTimeStamp*)outputTime
{
NSLog( @"getFrameForTime" );
if( !shouldRun ) return kCVReturnError;
redcomp = redcomp + 0.01;
NSLog( @"... red = %f", redcomp );
GLint e = glGetError();
if( !displayList )
{
NSLog( @"Create displayList" );
}
else
{
NSLog( @"Use existing displayList" );
}
return kCVReturnSuccess;
}
If I remove the glGetError() line, everything works (NSLog messages
come spurting out at high speed).
I've looked at the disassembly of the thread and there's nothing
special happening around the call to glGetError, in fact, immediately
prior is a call to NSLog which works. I was thinking that maybe
glGetError was some sort of macro or inline function that might put
some code in the caller. Doesn't seem to be the case. It's a dynamic
link stub: dyld_stub_glGetError (as is NSLog).
I'm not sure how to debug this. Any pointers?
On 11/04/2009, at 11:38 , Brian Bruinewoud wrote:
Thread 3:
#0 0x00002adc in -[MainView getFrameForTime:] at MainView.m:132
#1 0x0000292a in MyDisplayLinkCallback at MainView.m:88
#2 0x938c3d3f in CVDisplayLink::performIO
#3 0x938c42e1 in CVDisplayLink::runIOThread
#4 0x92b89095 in _pthread_start
#5 0x92b88f52 in thread_start
_______________________________________________
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