Jump to content
  • Advertisement
Sign in to follow this  
gejiaxu

toggling multisampling for swap chain?

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

Could someone tell me if it's possible to toggle the multisampling settings of a swap chain after its created without actually resetting it? Or perhaps there's a different (and hopefully not overly complicated) solution to my problem: basically I'm using DX9 mostly for drawing textures in 2D, but there are a few shapes drawn dynamically over the textures which I'd like to have anti-aliased. Problem is that turning on multisampling can distort some of the tinier textures rendered onto the back buffer. Perhaps it's possible to temporarily disable multisampling while drawing the shapes? Thanks for any suggestions!

Share this post


Link to post
Share on other sites
Advertisement
There is a renderstate (D3DRS_MULTISAMPLEANTIALIAS ) that allows dynamically enabling and disabling multisample on a multisample target.

Share this post


Link to post
Share on other sites
Wow... the answer was that simple, how convenient. Thanks! Perhaps it's now obvious that I just started using DirectX.

I found it in the SDK docs where it says "By default, Direct3D does not perform antialiasing." and that you have to enable it by setting the D3DRS_MULTISAMPLEANTIALIAS state to true. But I already have AA working and I never actually set the render state. I suppose that means D3D automatically enables multisampling when a MultiSampleType and Quality are provided?

Share this post


Link to post
Share on other sites
Quote:
Original post by gejiaxu
Wow... the answer was that simple, how convenient. Thanks! Perhaps it's now obvious that I just started using DirectX.

I found it in the SDK docs where it says "By default, Direct3D does not perform antialiasing." and that you have to enable it by setting the D3DRS_MULTISAMPLEANTIALIAS state to true. But I already have AA working and I never actually set the render state. I suppose that means D3D automatically enables multisampling when a MultiSampleType and Quality are provided?


Yes by default means here that you need to create multisample render target/back buffer to get AA. The default value of this render state is true but it would be ignored If you render to a target that does not have multiple samples.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!