Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ID3D10Device::SetPredication method

Set a rendering predicate.


void SetPredication(
  [in] ID3D10Predicate *pPredicate,
  [in] BOOL            PredicateValue


pPredicate [in]

Type: ID3D10Predicate*

Pointer to a predicate (see ID3D10Predicate). A NULL value indicates "no" predication; in this case, the value of PredicateValue is irrelevent but will be preserved for ID3D10Device::GetPredication.

PredicateValue [in]

Type: BOOL

If TRUE, rendering will be affected by when the predicate's conditions are met. If FALSE, rendering will be affected when the conditions are not met.

Return value

Returns nothing.


The predicate must be in the "issued" or "signaled" state to be used for predication. While the predicate is set for predication, calls to ID3D10Asynchronous::Begin and ID3D10Asynchronous::End are invalid.

This method is used to denote that subsequent rendering and resource manipulation commands are not actually performed if the resulting Predicate data of the Predicate is equal to the PredicateValue. However, some Predicates are only hints, so they may not actually prevent operations from being performed.

The primary usefulness of Predication is to allow an application to issue graphics commands without taking the performance hit of spinning, waiting for ID3D10Asynchronous::GetData to return. So, Predication can occur while ID3D10Asynchronous::GetData returns S_FALSE. Another way to think of it: an application can also use Predication as a fallback, if it is possible that ID3D10Asynchronous::GetData returns S_FALSE. If ID3D10Asynchronous::GetData returns S_OK, the application can skip calling the graphics commands manually with it's own application logic.






See also

ID3D10Device Interface



© 2018 Microsoft