More work on encapsuating OpenGL