some ogl optimizations