Original Post
Does D3D state change function keeps track of the current state and discard a change that is the same? For example: Will D3D know if the second call is redudant internally or do we have to do something like this: What about for OpenGL?
pD3Device->SetRenderState( <StateTypeA>, <StateA> );
pD3Device->SetRenderState( <StateTypeA>, <StateA> );
//assume some state saving mechanism
if ( StateType == <StateTypeA> )
{
if ( State != <StateA> )
{
pD3Device->SetRenderState( <StateTypeA>, <StateA> );
}
}