Jump to content
  • Advertisement
Sign in to follow this  
Galmiza

One pass, Two surfaces

This topic is 4883 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I would like to have the result of a rendering pass on two surfaces (same dimensions and same format): the back buffer (easy) and another surface. I get the back buffer surface using GetBackBuffer(0,0,D3DBACKBUFFER_TYPE_MONO, &m_pBackBufferSurface) The back buffer is lockable and the depht stencil is discard. The other surface is the 1st level surface of a texture created with these parameters: D3DUSAGE_DYNAMIC and DEDPOOL_DEFAULT. The copy succeeds if I lock both surfaces and do a simple memcpy. But it is so slow... I would like to use the UpdateSurface method, but it doesn`t work. How could I do. I can render in the other surface, but the hardware copy to the back buffer fails. Is there another way to fulfill my wish ? Thanks a lot. PS: I am french, do not mind about english mistakes.

Share this post


Link to post
Share on other sites
Advertisement
The D3DXLoadSurfaceFromSurface is slow.

In fact I want to use the first pass rendering result in a pixel shader for a second pass.

Is there a way I can define a texture whom 1st level surface is the back buffer ?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!