   Benefit of using D3DXRenderToSurface?
  Hi there.  I'm wondering if there's a benefit to creating a D3DXRenderToSurface, as opposed to creating a render target surface, setting it as the device render target, and then replacing the back buffer when you're done.  Because, from what I can tell, other than swapping some pointers, the process and results are identical.  Perhaps there's a performance difference I'm not seeing.  Just curious.Also, CreateRenderToSurface apparently builds some polygons representing the surface.  What are these for?  Is there a way to send them to the rendering device?  I don't understand what purpose this serves if you have to create another mesh to present your target surface.  Again, just curious.   
Quote:Original post by TomHi there.  I'm wondering if there's a benefit to creating a D3DXRenderToSurface, as opposed to creating a render target surface, setting it as the device render target, and then replacing the back buffer when you're done.  Because, from what I can tell, other than swapping some pointers, the process and results are identical.  Perhaps there's a performance difference I'm not seeing.  Just curious.Other than wrapping up the process of creating an RT, storing the old surface, activating the new one, and replacing the old one, it doesn't really do much at all.  I doubt there is any real performance loss/gain anywhere, as it is basically doing the exact same thing you would be doing.  The same thing goes for ID3DXRenderToEnvMap.  It is a little nicer for device resets, since it can automatically re-create the RT.  However, I don't use it because I need the freedom of managing all of the app's render-targets by myself.   