So I am at my third or fourth attempt at porting my base application from DirectX9 to DirectX10 and while this is going better than the rest, I'm still having tons of problems.
I managed to get basic rendering working, but not I need to allow for the possibility of changing the device settings.
So here are a few questing:
1. How do you "recreate" the device?
In DX9 you could change render targets and sucks, but generally you had to reset you device.
In DX10 I think you can use swapChain.ResizeBuffers for simple cases, like user window resize. That fails silently for me, so I guess I need to clear up some resources.
I did dome Googleing and found that I need to Dispose all the resources created when the swap chain was created.
This works fine, but I was wondering how to manage a lot of render targets. The engine can use anywhere from 1 to around 10 for a full suite of effects. Should this be done with the swapchain or should one keep the swap chain buffer count low and manage render targets manually.
Secondly, how to really "Recreate" the device? Like when changing MSAA mode? All my attempts to recreate the swap chain resulted in the display driver crashing. And how to handle going from fullscreen to windowed with or without render target size change?
2. Effect is a lot weirder in DX10. Should I update my engine to use vertex and pixel shaders instead of effects?
3. Font.DrawText ruins the device context. I tried setting device.Rasterizer.State and device.OutputMerger.DepthStencilState at the beginning of the draw function but this is not enough. I temporarily fixed this by using Sprite and calling Begin/End with a parameter so it backs up the device state, but it would be better if I could set all device context variables so that rendering works without the use of Sprite.
4. DX9 was using BGRA colors and DX10 uses RGBA colors?