Jump to content
  • Advertisement
Sign in to follow this  
SparkyFlooner

Get methods seem to work with pure device

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

When you make a pure device, all the literature says that "Get" methods for retrieving device state won't work. (Methods that return interfaces to objects are an exception.) But calling GetDeviceCaps returns S_OK on a pure device. So.....what's the deal? Can I not trust what is returned? It's not like the device capabilities could change unless you switch devices. Is there some 'better' documentation about pure devices than what's given in the DX documentation?

Share this post


Link to post
Share on other sites
Advertisement
...well....I guess you have to answer that question method by method.

GetLight fails, GetClipStatus fails, but GetDeviceCaps is ok...all of the documentation out there is misleading when it says you can't use "Get" methods.

Share this post


Link to post
Share on other sites
Yeah, they're referring to the current state of the hardware. What you're getting is the hardware's abilities. Which is vital.

Share this post


Link to post
Share on other sites
To check if you can trust the returns:

- Init a regular device, check the caps
- Init a pure device, check the caps
- Compare results.

Share this post


Link to post
Share on other sites
What they mean when they say you can't use "gets" is only that you can't get non const variables. I.e. you're only not allowed to get things that you can also set. Since you have SetRenderState, you can't use GetRenderState. Since you have SetLight, you can't use GetLight. Since there is no such thing as SetCaps, you can safely use GetCaps. Make sense?

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!