off-screen rendering

Is it possible to create pbuffer without rendering window?

I want render scene to pbuffer and then save to disk. I don’t need OpenGL window, just console application. Is it possible?

Thanks
Micho

You need to first create a window, so that you can create a DC, so that you can extract the pbuffer creation entry points (the WGL pixel format extension).

Then, you can delete that context and window, and create your pbuffer context, and render into that.

I believe you can create a window, even if you’re a console application, by just calling CreateWindow(). You don’t even need to show it to create the OpenGL context.