View Full Version : How to copy directly one texture to another
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.
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.
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
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.