Organizing and generalizing gl internal format.