I just spent 3 days trying to understand why pixel-perfect OpenGL wouldn't work before realizing that -ffast-math was corrupting the viewport dimensions.
>>4
If you're casting values between floats, doubles, and integers you're doing it wrong. Learn to use rint, round, trunc, floor, and ceil properly, or the SSE equivalents if you're doing SSE vector math.