replace c-style casts with c++ style throughout basicGL