mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
showbase: fixes for aspect-ratio adjustment of pixel2d(p)
This commit is contained in:
parent
36636aad81
commit
bdb53b8cb5
@ -2732,9 +2732,10 @@ class ShowBase(DirectObject.DirectObject):
|
||||
# changed and update the camera lenses and aspect2d parameters
|
||||
self.adjustWindowAspectRatio(self.getAspectRatio())
|
||||
|
||||
if win.getSideBySideStereo() and win.hasSize() and win.getSbsLeftYSize() != 0:
|
||||
if win.hasSize() and win.getSbsLeftYSize() != 0:
|
||||
self.pixel2d.setScale(2.0 / win.getSbsLeftXSize(), 1.0, 2.0 / win.getSbsLeftYSize())
|
||||
self.pixel2dp.setScale(2.0 / win.getSbsLeftXSize(), 1.0, 2.0 / win.getSbsLeftYSize())
|
||||
if self.wantRender2dp:
|
||||
self.pixel2dp.setScale(2.0 / win.getSbsLeftXSize(), 1.0, 2.0 / win.getSbsLeftYSize())
|
||||
else:
|
||||
xsize, ysize = self.getSize()
|
||||
if xsize > 0 and ysize > 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user