Benchmarks on CopySubTexImage vs RenderToTexture-

After recently complaining to Matt Craighead on this forum about OpenGL’s absent but oft-rumored “Render-To-Texture” extension, i ran some benchmarks comparing GL’s glCopyTexSubImage2D vs DX8’s SetRenderTarget.

Using both our D3D and GL graphics engines, i benchmarked the FPS in a room with 12 curved mirrors and 20 spinning teapots (~10k triangles total). Each mirror used its own rendered-on-the-fly texture at 512x512.

Test machines were the same (768meg, 1ghz P3). I used a GeForce2GTS and Radeon64DDR with the latest public drivers. Both the GL and DX demos scored roughly the same frame-rate.

Average Framerates at 640x480

GeForce 31.4 29.8
Radeon 19.4 24.3

GL was higher on GeForce and DX was higher on Radeon. No GL extensions were used and the vertex buffers for DX8 were updated each frame so as to pair evenly with GL’s per frame vertex array.

Considering that a 512x512 RGBA 32bit texture is exactly 1meg, and the internal bandwidth of this generation of video cards is rather enormous (memory clock * bandwidth >= several gig, ex 200mhz SDR * 128bits = 6.4gig ), it is reasonable to assume that the overhead of the copying in CopySubTexImage is actually minimal. (Minimal when compared to serious bottlenecks such as the AGP issues of moving your verts to the card)-

Anyways, thought this may be of use to those who ponder/question DX8 render-to-texture advantages-

Interesting! For your GeForce2, when you say “latest public drivers”, do you mean the 10.xx series or the official 6.xx drivers? glCopyTexSubImage2D() was allegedly optimized in the 10.xx drivers, and I’m curious about how much of a difference this made.

  • Tom

the 10.xx drivers…

Awsome!!! Thank you V. Now I can sleep again.

Kind of off topic, but is there a way to get the 10.xx drivers without being a registered nvidia developer?

Was this rendering the texture images into the backbuffer, or somewhere else?

32bit Backbuffer for GL, individual RenderTargets for DX8-

This just struck me: how did you glCopyTexImage2D() a 512x512 texture if you were running in 640x480? Didn’t you get a 32-pixel black border where your texture hit the edge of the window/screen?

  • Tom is one place to get drivers

Oops, right you are Tom. I changed to 800x600, not 650x480 to use the 512x512s.