public void WriteColor(int x, int y, Vector4f color)
{
color = Clamp (color);
uint r = (uint)Math.Round (color.X * 255);
uint g = (uint)Math.Round (color.Y * 255);
uint b = (uint)Math.Round (color.Z * 255);
uint a = (uint)Math.Round (color.W * 255);
uint p = b | (g << 8) | (r << 16) | (a << 24);
if (Tracing.Enabled) Console.WriteLine ("store {0:X8} at [{1}, {2}] from {3}", p, x, y, color);
Write (x, y, p);
}