How to rende only 1 frame ?

Now I want to render only 1 frame, then output the all pixel as data, how should I do in glut or Win32 API ? It seems that the program will always running, the data is always outputing ,how should I do this easily ?

If you’re only doing one frame, then odds are you aren’t looking to do graphics. So investigate some of the offscreen rendering possibilities. GLUT is not well-suited for this; two options are OSMesa, or writing your own Win32/WGL wrappers.

Generally the approach is to create an invisible window in order to get a context, and then do all rendering to FBOs.