Writing an AVI file of my openGL window

How would I go about writing a AVI file which records whats happening in my openGL window?

cheers
NeilW

There is not much point in answering this question, just have a look in the archives of this forum, the question has been asked at least 2048 times or so.

Mikael