Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CGLPBufferObj & glReadPixels



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


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.