PDA

View Full Version : window-system-provided depthbuffer



HellBringer
02-04-2011, 12:58 AM
How could I attach window-system-provided "depthbuffer" to application-created framebuffer object like this.

glFramebufferRenderbuffer(
GL_FRAMEBUFFER , GL_DEPTH_ATTACHMENT , GL_RENDERBUFFER ,
window-system-provided-depthBuffer );

I read the spec doc as follow.( http://www.opengl.org/registry/specs/EXT/framebuffer_object.txt )

By default, the GL uses the window-system-provided framebuffer. The
storage, dimensions, allocation, and format of the images attached
to this framebuffer are managed entirely by the window-system.
Consequently, the state of the window-system-provided framebuffer,
including its **images, can not be changed by the GL**, nor can the
window-system-provided framebuffer itself, or its images, be deleted
by the GL.

I wonder about the possibility of this.

skynet
02-04-2011, 01:20 AM
You cannot query the renderbuffers "attached" to the window framebuffer. Therefor you cannot attach them to other FBOs. The only chance to use the window depthbuffer values somewhere else is blitting or copying them.

HellBringer
02-04-2011, 02:26 AM
Thanks, skynet.
There are some unclear to me.
In DX, possible to get default depth buffer by using GetDepthStencilSurface.
I think It's same as renderbuffer(depth buffer) attached to the window framebuffer.
Then, It's possible only on DX?