Jump to content
  • Advertisement
Sign in to follow this  
Bekas

OpenGL GL_POLYGON_SMOOTH for Direct3d ?

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

What is the equivalent of OpenGL's GL_POLYGON_SMOOTH/GL_LINE_SMOOTH (drawing of a primitive with antialiased edges) for Direct3D ?

Share this post


Link to post
Share on other sites
Advertisement
I believe GL_POLYGON_SMOOTH applies to an old method of anti-aliasing that's no longer used on modern GPU's. These days multisampling is the preferred method of anti-aliasing. To enable multisampling, you have to create your backbuffer or render target with an appropriate multisample mode (2x, 4x). How this is done depends on the exact Direct3D API you're using (native D3D9, native D3D10, D3D9 through SlimDX, D3D10 through SlimDX, XNA Framework).

Share this post


Link to post
Share on other sites
Thank you for your responses but I'm already aware of the multisampling option.
The difference with GL_POLYGON_SMOOTH/GL_LINE_SMOOTH is that only the edges in a specific drawing call are antialiased, not the whole render target.

One helpful fella (who must've deleted his reply for some reason, cause it's gone now) pointed me to this link which seems to be Direct3D's version but only for lines :

http://msdn.microsoft.com/en-us/library/bb174699(VS.85).aspx

Share this post


Link to post
Share on other sites
Like neomech mentioned you can set the renderstate to enable it or disable it for any particular draw call.

Share this post


Link to post
Share on other sites
OpenGL has some state that is per-edge and not per-primitive. Direct3D render states can be divided down by primitives. If you want per-edge rendering differences, then you can emulate that with a shader and appropriate constant data.

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!