Archived

This topic is now archived and is closed to further replies.

Random Surface Aliasing

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

I have a simple Direct3D application in a C# window. I render multiple scenes to different panels. Sometimes, seemingly at random, when I resize the windows, one or more scene will suddenly blur, alias, or even completely disappear. Sometimes the geometry will change as well! I was hoping a grizzled pro might know what is causing this issue. If so, thanks in advance.

Share this post


Link to post
Share on other sites
Do you reset the device properly after resizing the windows?
The device may need to allocate more space for the framebuffer(s), but it cannot usually do so until the host application gives it''s consent for the operation (by calling Reset).
At very least, you see aliasing/blurring. At worst cases, you don''t see anything but garbage and/or background clear color.

Remember that after reset, you have to recreate all your resources that were in video memory. Managed resources are an exception, d3d caches them to system memory automatically.

-Nik

Share this post


Link to post
Share on other sites
Nik - I believe you were right on the money, but it leaves me somewhat confused with respect to the override hwnd parameter you can pass to device.present(). If I must reset my device whenever the window resizes, what extra power does the override hwnd paramter give you? (I thought the idea was you could draw to any window successfully while in windowed mode). What have I totally missed?

Share this post


Link to post
Share on other sites
quote:
Original post by Geronimo2000
I thought the idea was you could draw to any window successfully while in windowed mode.


Theoretically, yes. However, in practice, some device/driver combinations do not handle the stretching very gracefully.

Framebuffer stretching, I believe, was implemented only for convenience in debugging (not absolutely having to reset the device in windowed mode). For production quality, you need to use 1:1 size correspondence between the viewport and the frame buffer.

I haven''t studied much on the subject of multiple d3d viewports, so I cannot offer much alternatives. However, many apps pull the technique off nicely, for example 3DS Max.

-Nik

Share this post


Link to post
Share on other sites