Add texture coord and index pointer support.
Simplify offset calculation.

The code is repeated a lot, just make it a
1-liner.
Add comment for Buffer class.
Trivial syntax change.