static public dynamic vertexlayout(LispList args, LispEnvironment env) { int accum = 0; InputElement[] elements = new InputElement[args.Elems.Length]; int i = 0; foreach (LispElement arg in args) { InputElement current = arg.Eval(env); current.AlignedByteOffset = accum; accum += VertexFormats.getByteCountOf(current.Format); elements[i] = current; i++; } return(new { elements, elementSize = accum }); }