   [solved] output gets "corrupted" when window size changes
Edit:  Please see my second post, the problem described here is already solvedSo... I have this app using multiple target windows to render into using D3D9.Of course, I ran into the usual "how to handle resizing windows" problem and found a post saying that I could just create a back buffer with the desktop's size and use viewports afterwards. Since this meant I got around doing a device reset each and every time a window gets resized, I went that route.But, I am confused:My calls to Clear and Present were changed accordingly and work fine. I tested this by clearing only half of the target windows but presenting the full rectangle, resulting in half the windows being the color I cleared to and the other half getting that nice D3D debug flicker. So, I expect that area to be covered and I'm rather certain that that stuff is set up correctly, i.e. I'm not just presenting areas of the backbuffer that don't contain anything.Additionally, my test scene is definitely okay. Before changing to using viewports it rendered fine, which means that the vertex and index buffers were okay, the camera returned correct view and projection matrices etc... I assume this is the same now, as I haven't changed a thing in that regard.The problem now is: I don't see a thing anymore. The D3D debug runtimes don't give any errors and the only warnings I get are redundant render states, so nothing to worry about for now.Do I have to take the D3DVIEWPORT9 into account for the view and projection transform I use in my shaders in any way? I looked in D3D docs and found no further information about the usage of viewports...[Edited by - matches81 on June 19, 2009 8:34:52 AM]
  Once again, a stupid oversight ruins the day.I forgot to change the depth stencil buffer's size accordingly. My initial problem is solved, I guess, so I'm renaming the thread, too.However, I have a new problem.At startup, I'm back to getting the results I want, i.e. something like this:http://s2.imgimg.de/uploads/Good4efea5f5jpg.jpgBut, as soon as I resize the window, this happens:http://s2.imgimg.de/uploads/Bad19524750jpg.jpgSorry, I seem unable to get any kind of image posted :(Anyway:This is the exact same problem I had with my previous implementation that created a backbuffer with the size of the client window. It seems that some portions of the window are just not updated. The portions that aren't updated change when changing the window's size and remain constant between size changes.Any clues?Edit: Again, stupid oversight. I set the Z-value to clear to in the Clear call, but forgot to add the D3DCLEAR_ZBUFFER flag... Feel free to delete this thread entirely, as it just comes down to being blind due to hours of programming.[Edited by - matches81 on June 19, 2009 8:13:38 AM]