Directx 8 -> Directx 9

Started by
0 comments, last by Newbie00 20 years, 1 month ago
How would I do something like that in DirectX 9?

			pD3Device8->CreateStateBlock(D3DSBT_ALL, &old_state);
			pD3Device8->CaptureStateBlock(old_state);			
 			pD3Device8->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);

			HRESULT hResult = pD3Device8->DrawIndexedPrimitive(Type, MinIndex, NumVertices, StartIndex, PrimitiveCount);

			pD3Device8->ApplyStateBlock(old_state);
			pD3Device8->DeleteStateBlock(old_state);
 
Advertisement
Why not just something like:

D3DFILL oldfill = GetRenderState(D3DRS_FILLMODE) ;
...
SetRenderState(D3DRS_FILLMODE, oldfill) ;

This topic is closed to new replies.

Advertisement