Home | GR32_Blend |
EMMS
procedure EMMS;
Description
Calls to blending functions must be followed by EMMS procedure. This restores the state of FPU flags, altered by MMX instructions. When CPU does not support MMX, the EMMS function does nothing.
This function must be called after Blend, BlendEx or Combine calls, otherwise CPU will not be able to execute floating point instructions.
If you are using color algebra (such as ColorAdd, ColorMax etc.) that use MMX internally you also have to make sure that EMMS is called.
A typical example of using blending functions:
try for i := X1 to X2 do
begin
BlendMem(Clr32, P^); // This function uses MMX
Inc(P);
end;
finally
EMMS; // EMMS is called only once, since there is no FPU code inside the loop
end;
See Also
Blend, BlendEx, ColorAdd, ColorMax, Combine
Copyright ©2000-2007 Alex Denisov and Contributors - Graphics32 v1.8.3 - Build on 4-March-2007