// Set the floating point precision ...
_controlfp
// Question: Why do that for every frames ? Probably because precision is altered during the loop execution.
// Answer: The is no other call to this function. It appears that floating point precision remains the same during program execution.
I seem to vaguely recall reading something about some versions of Windows not preserving the FPU state across task switches. Could it be that this call to configure the FPU for every frame is a workaround for that?
I've also experienced Windows / DirectX API's use MMX, hence the floating point code I was using (x87 FPU) required a femms instruction before it to change back from MMX state.
This just goes to show that if you need a particular state on a processor (CPU, FPU, GFX, etc) you need to set it explicitly before use.