Reworked openGL output method.