Jump to content
  • Advertisement
Sign in to follow this  
Krisc

Anti-Aliasing...? And Screenshots...

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

Hey, I wish to add anti-aliasing into my application. I am using DirectX9 (April 05) as well as C#. I am using sprites to draw on the screen, the game is indeed 2D. I am also wondering how to take screenshots programmatically. Thank you, John [Edited by - Krisc on May 11, 2005 5:54:21 PM]

Share this post


Link to post
Share on other sites
Advertisement
For multisampling, when you create your device, in the presentation parameters, fill in the MultiSampleType and MultiSampleQuality, and set the SwapEffect to discard. You can use CheckDeviceMultiSampleType to find how many quality levels are available for each type. D3D8 style multisampling is done via type NONMASKABLE, and a quality level. For masked multisampling, there is an additional control, D3DRS_MULTISAMPLEMASK, to control which samples are used and which are masked.

To take a screenshot, there are a variety of methods. However, if you're using multi-sampling, only one method works. Create a surface of type A8R8G8B8. For fullscreen, the size should equal your full-screen resolution. For windowed, the size should equal the desktop size. Call GetFrontBufferData(). You can then use D3DXSaveSurfaceToFile().

Share this post


Link to post
Share on other sites
You create all video objects via the Direct3D device. Look in the SDK docs.
DirectX Graphics->Reference->Direct3D->Interfaces->IDirect3DDevice9.
Everything you ever wanted to know about creating objects can be found in that list of links.

edit: forgot the ->Interfaces-> sub [smile]

[Edited by - Jiia on May 12, 2005 1:44:49 AM]

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!