using opengl without creating window

I want to rotate an image using opengl and then save the image as bitmap . I am able to do that much .But the problem is that i dont want to create a window . Is it possible to do this ? i.e. i want opengl to do the math for me without initializing a window .

I thought that to get a context OpenGL will assign you a window (buffer) so you may not have a choice there.
However, nothing is stopping your Windows/Linux/Mac Window management code from simply setting the window properties so that it is not displayed. I have my Windows code such that I can get a full screen desktop, or a separate Window from the main application or set the OpenGL context to use a control (panel) on the main application as the ‘window’. If you have a GUI interface to your app then you can do the latter and thus size the panel control to 1X1 pixels or just hide it behind something else.

Check out:

If glXCreateContextAttribsARB succeeds, it initializes the context
to the initial state defined by the OpenGL specification, and
returns a handle to it. This handle can be used to render to any GLX
surface (window, pixmap, or pbuffer) compatible with <config>,

See this for some source code:


I guess on *nix systems, you can do it with that extension but on Windows and other OSes, see the FAQ