Jump to content
  • Advertisement
Sign in to follow this  
djnevs

Enable anti-alias?

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

How do i enable anti-alias in my project? and, when its enabled, how do i set the amount of samples (2x 4x 6x) ?

Share this post


Link to post
Share on other sites
Advertisement
See the MultiSampleType parameter within the D3DPRESENT_PARAMETER structure. You can enable antialiasing that way:

d3dPP.MultisampleType = D3DMULTISAMPLE_2_SAMPLES

and the attribute SwapEffect musst be D3DSWAPEFFECT_DISCARD

therefore: for any change of anitialiasing parameters you have to reset the graphics device.

Share this post


Link to post
Share on other sites
hmm, i cant use this D3D type of commands..
i just use plain directx in c#.

how do i enable this stuff?

Share this post


Link to post
Share on other sites
You should have a present parameter object in order to create your device.

It's declaration is something like this:


PresentParameters presentParams = new PresentParameters();



Just add this before you create your device:


presentParams.SwapEffect = SwapEffect.Discard;
presentParams.MultiSample = MultiSampleType.TwoSamples;

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!