   Correct/Fastest way to copy textures? ( ati problem )
  Stumbled across a problem in my code. In the depth only pass I render the depth into depth buffer A. During lighting I use A to reconstruct the position. Furthermore A is also attached as depth/stencil during lighting pass but with depth-write and stencil-write disabled ( just using stencil mask to block certain pixels ). On nVidia hardware this all worked without a problem but on ATI it garbles the screen it's not funny anymore. I tracked the problem down to the depth reconstruction failing due to the depth texture return garbage. Looks like ATI fumbles up if the depth buffer is attached while used as texture even if writing is disabled.So the only solution is to create a copy of the depth buffer to be used as texture ( which would also allow proper depth peeling should this ever happen ( not too feasible though since occlusion query is slower than any snail on earth ) ).So how is this best done to copy the depth buffer of the current FBO into a new depth buffer ( depth only is enough, no stencil required there )?   