glCopyTexSubImage2D speed..

Jogi

New member
My little test app needs to grap the framebuffer to texture every frame. I tested it by using glCopyTexSubImage2D() but speed seems to be too slow for "realtime" use. I'm using 512*512 texture for this purpose. I tested it with geforce256 too and the speed was at least 10x better than with my Club3D 8500LE (latest official drivers from the ATI website)

Even if glCopyTexSubImage2D() is most standard way to do "render to texture" method, it seems that HW acceleration support for it is bit lame (except with geforce series..)

Is there any hope to get more speed to lCopyTexSubImage2D() in future drivers?? Or is pbuffer only "right" way to do this? (although less common..)

Jogi
 
I've no experience with this, but my suggestion is to implement both and have the program decide which to use based on if the video card supports ARB_pbuffer.
 
You *HAVE* to make sure that the format you are copying is the same as the texture (IE. if you have a pixel format of 32 bit color, use GL_RGBA8, 24 use GL_RGB8, 16 use GL_RGB5).
Supposedly you can use GL_RGB for the internal format, but it hardly ever works.
 
Tried those different internal formats,... no help. Weird thing is that speed is same whatever I copy a small 16*16 or a big 512*512 chunk. Bug or feature? CopyTexImage2d speed is about the same as "SubTex" version.
If I remove just a glCopyTexSubImage2d() line, it (naturally) jumps to normal framerates..

I'll try pbuffer this weekend,.. it should cure slowness.
 
Holy cow!!! :eek: I updated my couple of weeks ago installed 2.1 drivers to 2.2 today and glCopyTexSubImage2d works like a dream. Great eh. Must have been a bug in 2.1 drivers?!
 
Jogi said:
Holy cow!!! :eek: I updated my couple of weeks ago installed 2.1 drivers to 2.2 today and glCopyTexSubImage2d works like a dream. Great eh. Must have been a bug in 2.1 drivers?!

Donno, but I was using the 02.1 drivers, and it worked fine.

Maybe a tweak messed it up? I donno *shrugs*
 
Weird, I don't tweak.. After updating to 2.2 drivers I installed sp3 to my W2000... Anyway, It was just too basic not to work. Back to code now, cheers.

Oh, and it was no just my proggy that did not work ok previously, I tried few other copytexsub examples.
 
Last edited:
Jogi said:
Weird, I don't tweak.. After updating to 2.2 drivers I installed sp3 to my W2000... Anyway, It was just too basic not to work. Back to code now, cheers.

Oh, and it was no just my proggy that did not work ok previously, I tried few other copytexsub examples.

Odd. Oh well, as long as it works now. :)
 
Back
Top