When I draw something on a DirectX surface it sometimes flashes. Why?