On Tue, Jun 22, 2010 at 9:25 AM, Ben Haller <bhcocoa...@sticksoftware.com> wrote: > It's a little weird because this method gets called sometimes on a view > that is not yet installed in a window, so I just make a window then and > there. (This is run in a headless command-line app, I ought to mention.) > And yes, I don't bother cleaning up the window and such; right after this > image writes out, the task exits, so cleanup doesn't matter. Note that I am > sure the rendering is in fact complete; I see the window flash onscreen, and > it has everything in it. (I can also run my app in a GUI mode, and all the > rendering looks right then.)
I don't have an answer to your question, but you might consider switching to offline rendering for the command-line mode so that you don't have to mess around with windows and such. You can use -[NSOpenGLContext setOffScreen:width:height:rowbytes:] to point it into your own pixel buffer, thus eliminating the need for glReadPixels completely. Who knows, it might even fix your problem too.... Mike _______________________________________________ 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