View Full Version : windowless rendering possible?
05-11-2007, 05:46 AM
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!
05-11-2007, 05:56 AM
It's a Windows application by the way...
05-11-2007, 06:37 AM
So far I found info about PBuffers and framebuffer object extension (FBO).
Any reason to use one or the other?
05-11-2007, 06:41 AM
definitely FBO. with FBOs you don't need to swap contexts and they are plattform independet.
05-11-2007, 06:57 AM
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.
05-11-2007, 07:26 AM
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?
05-11-2007, 07:34 AM
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...
05-11-2007, 08:09 AM
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?
05-11-2007, 09:35 AM
Look at these two topics. I hope they will be of some use to you:
05-11-2007, 11:48 AM
I'll check out the links!
05-14-2007, 12:16 AM
Please check this link
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.