![]() |
|
#1
|
|||
|
|||
|
Toggling between 2D and 3D on the fly.
Is it possible to switch between having the Quadbuffer functionality turned on and off on the fly while running a vizard script?
__________________
|
|
#2
|
|||
|
|||
|
Yes, you can use the viz.MainWindow.stereo command to change the stereo mode at runtime. Here is a sample script that toggle quad buffer stereo using the spacebar:
Code:
import viz
import vizact
viz.go(viz.QUAD_BUFFER)
viz.add('gallery.osgb')
def ToggleStereo():
if viz.MainWindow.getStereo() & viz.QUAD_BUFFER:
viz.MainWindow.stereo(0)
else:
viz.MainWindow.stereo(viz.QUAD_BUFFER)
vizact.onkeydown(' ',ToggleStereo)
|
|
#3
|
|||
|
|||
|
Thank you. This saved me a bit of time.
__________________
|
![]() |
|
|