How do I create multiple Pbuffers?

Started by Seink, April 05, 2016, 21:34:34

Previous topic - Next topic

Seink

Hello,
The program I'm working on had its structure changed to a layered structure, where one layer does all image processing, creates the frames and pass it to another layer that draws it in the window and interact with the user.
So, the layer where the image processing happens lost its connection to the window.
I tried using a Pbuffer to draw and it worked fine up to the point where the user resizes the window.....
So I tried to create a new Pbuffer when the resize event happens, but after creating the second Pbuffer, the image I extract with glReadPixels is returning black.

1) Is it possible change the size(width and height) of a Pbuffer?
2) Is it possible to create multiple Pbuffers of different sizes? If yes, how do I swap between the new and old Pbuffer?