windowless rendering possible?

Hi all,

I want to render an image in my application, but it has to happen all in the background. So no visible window may be created. The image has to be written to disk in the end.

I already tried some things to create an invisible window, but still the screen flickers.

Are there any standard solutions for this?
Thanks a lot!

It’s a Windows application by the way…

So far I found info about PBuffers and framebuffer object extension (FBO).

Any reason to use one or the other?

definitely FBO. with FBOs you don’t need to swap contexts and they are plattform independet.

You still need at least one rendering context - FBO does not create context. There was a topic aout this some time ago (a few months back). Somebody tried to run application as service so search for that.

i’m not so familiar with windows- but i guess you can create a window without showing it on screen and still create a gl context for it… right?

Idd I can create a window without showing it, but it still flickers on the screen, or at least the desktop redraws its icons and it should really be completely unnoticable.

Can’t seem to find the other topic about the services though…

If I need a rendering context, I call wglCreateContext(hDC)…but then I need a device context too to pass it (hDC).

I usually get that from GetDC(hWnd) where I pass the window handle from the window I created before, but this time I don’t want a window. How can I create a rendering context then please?

Thank you!

Look at these two topics. I hope they will be of some use to you:

http://www.opengl.org/discussion_boards/ubb/ultimatebb.php?ubb=get_topic;f=9;t=000731#000001

http://www.opengl.org/discussion_boards/ubb/ultimatebb.php?ubb=get_topic;f=4;t=001576#000002

Thanks!
I’ll check out the links!

Please check this link
http://www.fengyuan.com/article/wmprint.html

It uses WM_PRINT command to capture the hidden screen.

I have used this in the past for drawing some thing on an invisible window and capturing as image. However its pure GDI no OpenGL, i guess it wont be a problem if you make this GL window.

Thanks
kumar.k