Using element buffer to draw a rectangle