Fixed strange rendering under D3D (unsure why graphics2d object must be re-created every time)