# [SlimDX] Cannot resize SwapChain!

## Recommended Posts

MrSparkle27    142
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

## Create an account

Register a new account