Sign in to follow this  

[SlimDX] Cannot resize SwapChain!

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);

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this