User-agent: Internet Messaging Program (IMP) 3.2.2
Yes, you can use glReadPixels() as you state. One reason why you
may not be getting data is that your pBuffer is is double-buffered
and you have not swapped buffers yet. Make sure that the format of the
data in main memory is compatible to that of the pbuffer.
I know this works because I have done it.
Gordon
Quoting Simon Goldrei <email@hidden>:
> Perhaps I should rephrase my last problem,
>
> I now have succeeded in obtaining a CGLPBufferObj which wraps a pbuffer
> with my desired image.
> (I reasonably confident in this, as I have used this CGLPBufferObj to
> create a temporary texture so that I can render it to the screen)
>
> I would like a copy of this CGLPBufferObj as a pixmap in system memory.
> glReadPixels() promises to do just this and according to:
>
> http://developer.apple.com/documentation/GraphicsImaging/Reference/
> CGL_OpenGL/Chap1/function_group_2.html
>
> <snip>
> It is also legal to use OpenGL functions such as glReadPixels to read
> the contents of a Pbuffer directly via the Pbuffer context.
> </snip>
>
> Exactly how do I do this? What is a Pbuffer context? as opposed to the
> CGLContextObj?
> Assuming I have a:
>
> CGLSetCurrentContext( glContextObj );
>
> Should it not be a simple as:
>
> glReadBuffer(GL_FRONT);
> glReadPixels(...);
>
> Any ideas what I may have missed (I'm not getting any data from
> glReadPixels )
>
> Thanks again,
> Simon.
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Mac-opengl mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/mac-opengl/email@hidden
>
> This email sent to email@hidden
>
--
Gordon Erlebacher
489 Dirac Science Library
Florida State University
Tallahassee, FL 32309
Tel: (850) 644-0186
FAX: (850) 644-0098
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden
This email sent to email@hidden