PDA

View Full Version : How to copy directly one texture to another



pashamol
02-05-2004, 07:25 AM
Not fast way is to copy texture to backbuffer and then from backbuffer to another texture.
But it is double copiing.

Won
02-06-2004, 10:25 AM
You can use render-to-texture and render (full screen textured quad) one texture to the pbuffer. However, this will require a rendering context switch which may be more expensive overall than the double copy. It depends on the relative bandwidth of the hardware and the particular driver implementation. Run a microbenchmark in your app and chose the faster one.

If you have backing store of the image on the client, then you can just use TexSubImage. Or, you can wait for a few months for someone to do the superbuffers extension.

-Won

MZ
02-07-2004, 06:45 AM
there are several alternatives:

1. switch to DirectX9 and use IDirect3DDevice::UpdateSurface

2. wait for OpenGL 2.0 and use glCopyImage[1D|2D|3D]

3. wait for for superbuffer extension and hope it will have solved that problem too