Jump to content
  • Advertisement
Sign in to follow this  
beebs1

Two Quick Questions

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

Hiya, I just had two questions I was hoping someone would answer. Firstly, is using anti-aliasing in DirectX as simply as specifying a MultiSampleType in the presentation parameters? If so, where in the CAPS structure can I find the number of samples supported by the video card (2x, 4x)? What does the MultiSampleQuality mean? Also, I'm looking for a way to store configuration settings, preferably in a text file for easy access. Using GetPrivateProfileInt seems perfect, but it seems to want me to pass the entire path to the INI file, and doesn't like spaces in the pathname. I'd rather not use the registry, so it looks like I'll have to write a simple file parser. Just wondered if anyone had used another method that worked. Anyway, that's it. Many thanks for any replies [smile]

Share this post


Link to post
Share on other sites
Advertisement
You will want to do some trial and error to figure out the max multisample quality a card can use. Use this function to run some tests.

public static bool CheckDeviceMultiSampleType(
int adapter,
DeviceType deviceType,
Format surfaceFormat,
bool windowed,
MultiSampleType multiSampleType
);

As for saving settings, is there a problem with creating a binary file unique to your game? You can always set up a struct for storing persistant values and reading it in at load time. You can even generate one with default values if it doesn't exist. If you prefer a text format, look into XML or create your own parser. These excercises are great for learning new techniques.

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!