Skip to main content
GameDev.net gamedev.net
🔒 Locked

Checking capabilities

Started by Kylotan Aug 7, 2002 at 1:28 PM 1 replies 300+ views
Original Post
Kylotan
Kylotan
In my basic DirectDraw and Direct3D stuff I just attempt to use a feature (such as anti-aliasing or fog) and note whether it fails or not. This seems to work fine, but the docs often suggest that you should check the caps to see what is available and what is not. What''s the general opinion on this? Are there ever adverse side-effects that come from trying to enable a feature that is not supported? [ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files ]
niyaw
niyaw
i think on d3d you can/should? use ValidateDevice to make sure that all your rendering settings are working together, can''t say anything about dd.
DrunkenHyena
DrunkenHyena
Yes, there can definitely be adverse effects. The can range from distorted graphics, to spontaneous crashes. You would think a well-behaved driver would just ignore your attempts to do an invalid thing, but they are a rare beast.

Though even if they did behave, it still leaves the state of your graphics up in the air. If you need to set 6 states for your effect, and 4 are valid, the last 2 aren''t, what gets displayed?

If you don''t want to handle this then your easiest option is to detect the caps at the beginning, and if they aren''t set, exit and tell the user their video card isn''t supported. It''s better than random graphics or crashing.

Stay Casual,

Ken
Drunken Hyena
Stay Casual,KenDrunken Hyena</FON

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.