Jump to content
  • Advertisement
Sign in to follow this  
longlong9

about SwapChains

This topic is 2105 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 have a problem.

 

i createdevice , then it will create  implicit swapchain, i call GetNumberOfSwapChains ,i get the num is  1, then i call CreateAdditionalSwapChain

 

then GetNumberOfSwapChains,i get the num also is 1.why it is not increase to  2??

Share this post


Link to post
Share on other sites
Advertisement

Do you have the debug device enabled, and if so, are you getting any debug messages when you run your program?  Also, did you check the HRESULT of the CreateAdditionSwapChain method?

Share this post


Link to post
Share on other sites

The documentation explicitly states that IDirect3DDevice9::GetNumberOfSwapChains() returns the number of implicit swap chains created by IDirect3D9::CreateDevice().

That means swap chains created by IDirect3DDevice9::CreateAdditionalSwapChain() are not counted.

It is behaving as it should.

 

If you need to know how many swap chains you have, it is IDirect3DDevice9::GetNumberOfSwapChains() + (each successful call to IDirect3DDevice9::CreateAdditionalSwapChain()).

 

 

L. Spiro

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!