moved the gl calls