OpenGL problem solved. Still a problem with the progress bar though.