Background rendering

My question is simple… is there some way of rendering images in the background in win32? Like CreateCompatibleDC(0), add a bitmap and a rendering context?

Can it work?

Its possible to render to bitmaps, but it will run in software mode.

Look up p-buffers (pixel buffers) at nvidia or ATI site. That will be in hardware!

V-man

Originally posted by V-man:
Its possible to render to bitmaps, but it will run in software mode.
Look up p-buffers (pixel buffers) at nvidia or ATI site. That will be in hardware!
V-man

Is there no other way around this? Would it have the same effect to create an invisible window and render into that instead, extracting the image from the hidden window after rendering?
Or doesn’t OpenGL render into invisble windows at all?

lasso,

the contents of such a window are undefined. P-buffers are the best way to go, but another way (MUCH bigger performance hit) would be to render to the backbuffer, not flip, and then use glReadPixels. All in all, pbuffers are better for most things.

Originally posted by thewizard75:
lasso,
the contents of such a window are undefined. P-buffers are the best way to go, but another way (MUCH bigger performance hit) would be to render to the backbuffer, not flip, and then use glReadPixels. All in all, pbuffers are better for most things.

Allright, thanks, I’m beginning to get an image of it now…

To strangeify the question… =)
Support all I’m interested in is a 1x1 pixel viewport and that I’m only going to perform selection testing… how would that change the situation? Do I even need to care about pixelformats etc then?

What I’m actually trying to do is use OpenGL for background raytracing purposes. The tricky part is I would like it to work without even having an OpenGL window visible to the user. =)

/ Lasso - the wicked