Pbuffer RTT - wasteful?

Creating some benchmarks to compare pbuffers with FBOs has led me to a rather odd problem. I hope I’m wrong on this, so would appreciate someone correcting me. :smiley:

To perform pbuffer RTT, one must allocate a pbuffer with wglCreatePbufferARB and then bind an allocated texture with wglBindTexImageARB. This leads me to a silly realisation: haven’t I just allocated twice as much video memory as I need for RTT?

glTexImage2D, as I understand it, allocates video memory. wglCreatePbufferARB must also or I wouldn’t be able to render without RTT. So if I’m working with very large textures, would this not lead to a lot of wasted memory? Someone please tell me I’m wrong. :eek:

wglBindTexImageARB is supposed to directly bind the pbuffer memory to the texture without doing any copy (otherwise you could just use glCopyTexImage). But there´s nothing that could hinder the driver to do it anyway (for some odd reason).

Ah. So the glTexImage2D call isn’t necessary for BindTexImageARB to work its magic. :wink: