Sign in to follow this  
SparkyFlooner

Get methods seem to work with pure device

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

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