pbuffers

Brian Paul brian@tungstengraphics.com
Mon, 08 Dec 2003 16:58:14 -0700


Michel D=C3=A4nzer wrote:
> On Mon, 2003-12-08 at 18:29, Brian Paul wrote:
>=20
>>In terms of render-to-texture for X-on-OpenGL, one deficiency is the=20
>>lack of a way to resize a Pbuffer (to respond to window resizes).
>=20
>=20
> Can't the X server get a new pbuffer (and possibly copy the contents of
> the old one to it) in that case?

Yes, you could probably do that.  I'm thinking that if you have a way=20
to tell the allocator that your intention is to resize the pbuffer (vs=20
destroying it and creating a new one) that there may be some=20
opportunity for optimization.

For example, if your pbuffer memory must be allocated at a 32-byte=20
pitch, then changing the width by less that 8 pixels (4-byte pixels)=20
might not require allocating new memory at all.

-Brian