write the buffer template and first drawing primitive.