Mailing Lists: Apple Mailing Lists

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

double buffered pbuffer



I would like to ping-pong between two pbuffers (for multi-pass blending on floating point pixels), and if possible I'd like to use a single double buffered pbuffer so that I can swap buffers instead of having to switch contexts. I'm running into a problem with CGL. It appears that if I do a CGLFlushDrawable it doesn't swap the buffers (the resulting image obviously is reading and writing to the same buffer). I can manually make things work by setting the draw buffer via glDrawBuffer, and then calling CGLTexImagePBuffer with the same buffer the I drew into and setting glDrawBuffer to the other buffer. ie:

glDrawBuffer( GL_BACK );
// draw things
glFlush();

// now switch to other buffer
glDrawBuffer( GL_FRONT );
glBindTexture( GL_TEXTURE_2D, pbuffer_texture ); CGLTexImagePBuffer( context, pbuffer, GL_BACK );
....


Why doesn't CGLFlushDrawable swap the buffers as the documentation seems to indicate. Is this a bug, or am I miss-reading the documentation? Is there another way to swap the buffers of a double buffered pbuffer?

thanks!
-j
_______________________________________________
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.