Comment 3 for bug 1186887

Revision history for this message
Craig Macomber (craigm) wrote :

Here is some code that demonstrates this error: (Without threading, the depth buffer sharing still fails, but thats a different bug that I will also file)

from panda3d.core import loadPrcFileData
loadPrcFileData("", "threading-model Cull/Draw")

import direct.directbase.DirectStart
from panda3d.core import *

winprops = base.win.getProperties()
props = FrameBufferProperties()
props.setRgbColor(1)

out = base.graphicsEngine.makeOutput(
     base.pipe, "x", -2,
     props, winprops,
     GraphicsPipe.BFSizeTrackHost | GraphicsPipe.BFCanBindEvery |
     GraphicsPipe.BFRttCumulative | GraphicsPipe.BFRefuseWindow,
     base.win.getGsg(), base.win)

shared=out.shareDepthBuffer(base.win)
if not shared:
    print "Failed to share depth"

run()