Jump to content
  • Advertisement
Sign in to follow this  
MrSparkle27

[SlimDX] Cannot resize SwapChain!

This topic is 3627 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

Hi! I have trouble to resize the SwapChain using SlimDX. I create a SwapChain as showed in the MiniTri example. When resizing the window, I call the ResizeBuffers method. The DirectX help says that I have to release all back buffer pointers, so I call the Dispose method of the RenderTargetView. The backbuffer surface is automatically disposed by the using statement:
swapChain = new SwapChain(DX10Factory, DX10Device, swapChainDescription);

using (Texture2D resource = swapChain.GetBuffer<Texture2D>(0))
{
	DX10RenderTargetView = new RenderTargetView(DX10Device, resource);
}

DX10RenderTargetView.Dispose();
swapChain.ResizeBuffers(1, 700, 800, Format.R8G8B8A8_UNorm, SwapChainFlags.None);
Why do I always get an exception saying that I have to release the resources before resizing the SwapChain? Thanks Christian

Share this post


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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!