Reorganized the code: separated OpenGL rendering code from window and context setup, and event processing, which depends on the library being used. Extremely basic base class for applications.