PDA

View Full Version : Pbuffer RTT - wasteful?



Jay Cornwall
09-12-2005, 03:12 AM
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. :D

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:

skynet
09-12-2005, 05:59 AM
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).

Jay Cornwall
09-12-2005, 07:02 AM
Ah. So the glTexImage2D call isn't necessary for BindTexImageARB to work its magic. ;)

Cheers.