I wish to have my buffers all share the depth with base.win.
I can have all my new buffers share depth with each-other just fine, but if I try and make them share with base.win I get this error:
:display:gsg:glgsg(error): share_depth_buffer: non matching multisamples
and shareDepthBuffer returns false, and the depths are not shared.
This indicates that I have multisamples somewhere, but my FrameBufferProperties don’t show any:
The requested values:
depth_bits=1 alpha_bits=1 aux_rgba=2
depth_bits=24 color_bits=24 alpha_bits=8 back_buffers=1 force_hardware=1
the values of the returned buffer that can not share depth with base.win:
depth_bits=1 color_bits=1 alpha_bits=8 stencil_bits=1 aux_rgba=2 force_hardware=1
No multisamples at all. I tried setting multisamples to 0 in my prc, as well as setting them to 0 in the FrameBufferProperties objects, and reading them from the FrameBufferProperties objects (they were 0).
How can I get past this to share depth with base.win?
I’m using panda 1.7.2 on mac.
My Code, derived from the fireflies sample:
def makeFBO(self, name, auxrgba, shareDepthWith=None): # This routine creates an offscreen buffer. All the complicated # parameters are basically demanding capabilities from the offscreen # buffer - we demand that it be able to render to texture on every # bitplane, that it can support aux bitplanes, that it track # the size of the host window, that it can render to texture # cumulatively, and so forth. winprops = base.win.getProperties()#WindowProperties() props = FrameBufferProperties() props.setRgbColor(1) props.setAlphaBits(1) props.setDepthBits(1) props.setAuxRgba(auxrgba) print base.win.getFbProperties() print props out = base.graphicsEngine.makeOutput( base.pipe, name+" buffer", -2, props, winprops, GraphicsPipe.BFSizeTrackHost | GraphicsPipe.BFCanBindEvery | GraphicsPipe.BFRttCumulative | GraphicsPipe.BFRefuseWindow, base.win.getGsg(), base.win) print out.getFbProperties() if shareDepthWith: shared=out.shareDepthBuffer(shareDepthWith) if not shared: print "Failed to share depth" out.setClearDepthActive(False) return out