Archived

This topic is now archived and is closed to further replies.

WebsiteWill

Question on checking device caps

Recommended Posts

In the SDK the framework code there goes through a LOT of work to enumerate all possible capabilities of all adapters on the computer. As opposed to querying all possible capabilities would it be viable to just check for the capabilities needed by my application and only allow the use of those abilities? I''d like to not duplicate all of that processing from the SDK because I really don''t see the need to do so. But in the sense of creating a "complete" project should I do so when I can just specify what capabilities I NEED and make sure the hardware supports them. If not then throw an error "Sorry but your hardware is not supported by this game". Of course code for alternate solutions so I will have to check for all possible display modes and color depth, etc but I don''t see a need to enumerate EVERY possible capability do you? TIA, Webby

Share this post


Link to post
Share on other sites
quote:
In the SDK the framework code there goes through a LOT of work
to enumerate all possible capabilities of all adapters on the computer.

As opposed to querying all possible capabilities would it be viable to just check for the capabilities needed by my application and only allow the use of those abilities?

The SDK samples do all the enumeration because they expose a "setup" option (File->Change device) in which you can change things like:
Adapter format, refresh rate, back buffer format, depth/stencil format, multi-sample type, multi-sample quality, vertex processing and presentation interval.

Obviously, a lot of these aren''t exposed to the "ordinary" client (the game player, for example). For example, I''ve never seen a game that prompted be for the type of the back buffer (as in A8R8G8B8 or R5G6B5). Naturally, you just say "16 or 32 bpp", and when the user decides you choose the best fit.

quote:
I''d like to not duplicate all of that processing from the SDK because I really don''t see the need to do so. But in the sense of creating a "complete" project should I do so when I can just specify what capabilities I NEED and make sure the hardware supports them. If not then throw an error "Sorry but your hardware is not supported by this game".

You''ve said it yourself , "I really don''t see the need to do so". Check for the caps you''re going to use.

Any chance we''d have a look at your complete project sometime?

Muhammad Haggag

Share this post


Link to post
Share on other sites
Actually, part of this effort is to generate some tutorials for this community However, I want a full understanding and some working code before I go there. After all, 95% of the project is likely to be built from the experience gleamed from this board.

Thanks for the input on the caps. I''m off to start a DirectGraphics wrapper class to handle all initialization and maintenance. Wish me luck!

Webby

Share this post


Link to post
Share on other sites
quote:
Original post by WebsiteWill
Thanks for the input on the caps. I''m off to start a DirectGraphics wrapper class to handle all initialization and maintenance.

Careful with that one!
Make a wrapper that''s as thin as possible. Making it thick would limit/hide functionality, unless you make it extremely thick - i.e. A full-blown abstraction of every feature in D3D, for portability across platforms (and then you''d write 2 implementations of your abstraction: d3d and ogl).

quote:
Wish me luck!

You''ve got it: Good luck!
There''s no way you''re going to mess things up now, I suppose

Muhammad Haggag

Share this post


Link to post
Share on other sites