mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
filter: Respect depth-bits from Config.prc
This commit is contained in:
parent
2e38ca1042
commit
ce437629c2
@ -299,7 +299,7 @@ class FilterManager(DirectObject):
|
||||
|
||||
return quad
|
||||
|
||||
def createBuffer(self, name, xsize, ysize, texgroup, depthbits=1, fbprops=None):
|
||||
def createBuffer(self, name, xsize, ysize, texgroup, depthbits=True, fbprops=None):
|
||||
""" Low-level buffer creation. Not intended for public use. """
|
||||
|
||||
winprops = WindowProperties()
|
||||
@ -307,6 +307,11 @@ class FilterManager(DirectObject):
|
||||
props = FrameBufferProperties(FrameBufferProperties.getDefault())
|
||||
props.setBackBuffers(0)
|
||||
props.setRgbColor(1)
|
||||
if depthbits is True:
|
||||
# Respect depth-bits from Config.prc
|
||||
if props.getDepthBits() == 0:
|
||||
props.setDepthBits(1)
|
||||
else:
|
||||
props.setDepthBits(depthbits)
|
||||
props.setStereo(self.win.isStereo())
|
||||
if fbprops is not None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user