All,

I'm trying to run an OpenGL animation. At first I tried an NSTimer, but couldn't get the output to appear unless I resized the window. It was as if the redraw caused by NSTimer wasn't swapping buffers or whatever whereas the redraw caused by resize was. Note, however, that the OpenGL code did work as expected so long as the window was resized.

So I looked around and I found "Technical Q&A QA1385" in "ADC Home > Core Reference Library > Games > Graphics and Imaging".

I already raised a bug on this code (the name of callback differs from the name supplied to the CV framework) but have otherwise managed to get the code to compile without warnings and run.

However, if I place any openGL code (even just glGetError) in the "// Add your drawing code here" location, the program crashes (NSLog calls work fine). Note that the openGL code isn't called until after applicationDidFinishLaunching so its not something like partially constructed/initialised objects...

The call stack is:
#0      0x92b581c6 in mach_msg_trap
#1      0x92b5f9bc in mach_msg
#2      0x90c270ae in CFRunLoopRunSpecific
#3      0x90c27cd8 in CFRunLoopRunInMode
#4      0x96e6f2c0 in RunCurrentEventLoopInMode
#5      0x96e6f0d9 in ReceiveNextEventCommon
#6      0x96e6ef4d in BlockUntilNextEventMatchingListInMode
#7      0x91e3dd7d in _DPSNextEvent
#8 0x91e3d630 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
#9      0x91e3666b in -[NSApplication run]
#10     0x91e038a4 in NSApplicationMain
#11     0x0000250c in main at main.m:13

What am I missing?

I am perhaps foolishly assuming that nothing more is required to get CV working because the article implies that. If that's not the case, I'll raise another bug on the article.

Thanks,
Brian.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to