mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
auto-clear depth between eyes by default for stereo
This commit is contained in:
parent
9d83449006
commit
6d630e2cf1
@ -1324,10 +1324,6 @@ class ShowBase(DirectObject.DirectObject):
|
|||||||
# we will if clearDepth is specified.
|
# we will if clearDepth is specified.
|
||||||
if clearDepth:
|
if clearDepth:
|
||||||
dr.setClearDepthActive(1)
|
dr.setClearDepthActive(1)
|
||||||
elif dr.isStereo():
|
|
||||||
# If it's a stereo DisplayRegion, we clear the right
|
|
||||||
# channel by default.
|
|
||||||
dr.getRightEye().setClearDepthActive(1)
|
|
||||||
|
|
||||||
if clearColor:
|
if clearColor:
|
||||||
dr.setClearColorActive(1)
|
dr.setClearColorActive(1)
|
||||||
|
@ -725,6 +725,16 @@ make_stereo_display_region(const LVecBase4 &dimensions) {
|
|||||||
// eyes are the same region: the region specified.
|
// eyes are the same region: the region specified.
|
||||||
left = new DisplayRegion(this, dimensions);
|
left = new DisplayRegion(this, dimensions);
|
||||||
right = new DisplayRegion(this, dimensions);
|
right = new DisplayRegion(this, dimensions);
|
||||||
|
|
||||||
|
// In this case, we assume that the two eyes will share the same
|
||||||
|
// depth buffer, which means the right eye should clear the depth
|
||||||
|
// buffer by default.
|
||||||
|
if (get_clear_depth_active()) {
|
||||||
|
right->set_clear_depth_active(true);
|
||||||
|
}
|
||||||
|
if (get_clear_stencil_active()) {
|
||||||
|
right->set_clear_stencil_active(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PT(StereoDisplayRegion) stereo = new StereoDisplayRegion(this, dimensions,
|
PT(StereoDisplayRegion) stereo = new StereoDisplayRegion(this, dimensions,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user