iOS OpenGL refactoring