Moved window and gl context creation to sample framework.
Add render commands before rendering the current frame, not after.
astyle