more GL optimizations