Re: Incomplete rendering returned from glReadPixels
Re: Incomplete rendering returned from glReadPixels
- Subject: Re: Incomplete rendering returned from glReadPixels
- From: Michael Ash <email@hidden>
- Date: Tue, 22 Jun 2010 12:28:55 -0400
On Tue, Jun 22, 2010 at 9:25 AM, Ben Haller
<email@hidden> 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 (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