got rid of more gl calls