Sign in to follow this  
beebs1

Two Quick Questions

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this