Sign in to follow this  
grill8

Question about minimum capabilities in a DirectX 9 application.

Recommended Posts

grill8    148
Hello all, I am trying to figure out the best way to be sure that the minimum capabilities of a DirectX version 9 app are supported during initialization. Ok, so my strategy is to have a class that fills out a D3DCAPS9 structure with the minimum capabilities that the app should be able to handle (worst case scenario). Then, during initialization create the best device available as normal. Then compare the newly device caps with the minimum caps struct. If the test passes then it is known that the application will be able to handle things during initialization. That way all validation is done during initialization and testing for caps is not needed during runtime. My questions are: 1) Is this the best way to handle min requirement validation? 2) Is there a easier way to handle the comparison between 2 D3DCAPS9 structs than using member by member comparison? Thanks for your help. Jeremy (grill8)

Share this post


Link to post
Share on other sites
remigius    1172
It does sound like an elegant way to check if the best device matches the minimum caps required for the application. However, mr Nedelman may have a point with checking the required caps directly. Without writing code for comparing each of the caps, how are you going to determine if the current best device caps are better or worse than the minimum caps? For multisampling alone this could already become quite a chore.

If you just want to create a device from the parameters dictated by the minimum caps and then check if the minimum caps are available (so a simple equal comparisson on the entire configuration), your idea may have some merit, but it would take a lot of the flexibility out of device creation.

Hope this helps & I understood your queston correctly :)

Share this post


Link to post
Share on other sites
grill8    148
Hello all,

Thank you. I think all things considered I will have a function that simply checks the states that are absolutely necessary for the application rather than all states as originally planned. Rewriting the function for each application may be required which I didn't want but I can't find a way around that. It shouldn' be a large chore for each app though and won't take that long.

Thank you again,
Jeremy (grill8)

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