Move GL calls to respective objects