I would like to use OpenGL (version 1.5) to render images to memory, without displaying them on screen (I can e.g. just save them as image files or render them as ASCII in terminal). I do not want any I/O. I've found similar question at SO but none that addresses my specific further requirements which will follow.
Now I think I could use a library like glx and tell it to not open any window, however I also don't want my code to depend on any windowing system library like X11, because my program simply doesn't do anything with any windows or I/O, I don't see why my program should be burdened by a dependency on X window (as some systems simply don't have X window, they may even have no graphical interface at all). My programs should only depend on an OpenGL driver.
I understand for this I need to create an OpenGL context, which is not part of OpenGL and which is something that's platform-dependent, so actually I might need some library for creating an OpenGL render-to-memory context ideally in a multiplatfom way (i.e. abstracting away the platform-dependent stuff). Does anything like this exist? (I am not interested in any proprietary, GPU-specific or driver-specific software, the program should run on any GPU that supports given OpenGL version.) Is there something else I should consider?
Basically I want my program to be very minimal and not burdened by what it doesn't need, given that all it needs is to use a generic OpenGL driver to render an image into memory, and should work on any system having such OpenGL driver.