about SwapChains

Started by
2 comments, last by longlong9 10 years, 3 months ago

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??

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?

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

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

ok! thanks!

This topic is closed to new replies.

Advertisement