use glDrawElements to reduce function calls